masks can not be copied between images of one project

Bug #1862460 reported by zarl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugin
New
Undecided
Unassigned

Bug Description

In 'Masks' tab I select one image in the list of images, click "Add new mask" button and create a new (standard "exclude region") mask. Now I select that mask in the 'Masks' list and type cmd+C. Now I switch to another image where I want to exclude the same region and type cmd+V. Nothing happens. The same happens with using the 'Copy' and 'Paste' buttons.

Duplicating masks this way works fine up to Hugin 2019.0.0 (tested with my new project that I created using 2019.2.0)

Affected Platform: OS X El Capitan Version 10.11.6
Hugin Version: 2019.2.0.b690aa0334b5 built by Niklas Mischkulnig

Revision history for this message
tmodes (tmodes) wrote :

There were no changes to this code between 2019.0 and 2019.2.
So I'm surprised that this happens. It works fine here.
So we need to find what does not work: either copy or paste (or both)?
So copy the mask, then check the content of the clipboard. Is something in the clipboard? If so, then copy works. If the clipboard is empty (or contains the last content) then copy does not work. (In this case you could please try the follow: Export the mask to a file. Then open the file with an editor and copy the content of the file into the clipboard. Now try to paste the mask from Hugin.

Revision history for this message
zarl (carl-einem) wrote :

Thanks for the hints! Here is what I tried:

- quit all other applications but a simple text editor (TextWrangler)

- quit Hugin and renamed my 'hugin preferences' file so Hugin starts with clean prefs. Are there more ways to reset Hugin?

- copy/paste in Masks tab still doesn't work for a new mask I created in a new test project file. Instead copy/paste works reliably when I e.g. copy a yaw value from one image to another using their respective 'image parameters' dialogs (i.e. select the value as text, cmd+C, close that dialog, open the dialog for a different image, select the value and cmd+V).

- when I copy some random text (alphanumerical) in my text editor I can paste it into a field that contains number values (Hugin is neatly checking validity, i.e. complaining if it's text and not a numerical value)

- I export a mask and open the *.msk file in my text editor, select all and copy, make sure it's in the clipboard and try to insert that in hugin‘s mask area for another image in the masks tab (both by pressing the ‘Paste‘ button and cmd+V) - no new mask appears but the warning sound as if I e.g. clicked outside of a warning dialog.

- BTW that warning beep doesn‘t sound when I press the 'copy' button but when I try to paste. I'm not sure how I can otherwise check the content of my clipboard on MacOS if it is not text or an image. AFAIK MacOS or at least several programs on Mac can manage different clipboard contents simultanuosly (select text for a file name in TextWranger and copy that, then switch to Photoshop and select parts of an image, copy that, still in Photoshop cmd+N opens the dialog for a new image and happily accepts my text as a file name while using the correct image proportions in Pixels for the 'image' content of my clipboard, on pressing 'OK' the dialog closes and opens a new image window without content, cmd+V inserts the image), but that may be specific to Photoshop.

I copied a numerical value in Hugin (the yaw of one image's position), which can be pasted to the text editor. Back to Hugin I try to copy a mask (press button and no error beep), switch back to the text editor and try to paste again: this time an error beep sounds, the former numerical value that my clipboard had is gone.

Also I realized that my preferences file automagically resetted itself to defaults when I quit Hugin. So I once again set up my preferences, closed the preferences dialog and directly copied the 'hugin preferences' file (located in /Users/carl/Library/Preferences/hugin Preferences). Now I quit Hugin and can see that the prefs file once again changed according to the last saved date/time. I checked via a diff of both my earlier copy and the new prefs file that it was reset to defaults. Now I replaced the prefs file with a copy of my earlier copy and that suddenly worked (2019.2.0 now starts with my chosen prefs).
I want to add that I set up my prefs without having an individual project open. For some programs it makes a difference.

Revision history for this message
tmodes (tmodes) wrote :

Sorry, but I'm lost with your long text - and many new things which are (for me) unrelated to the problem.

The mask is copied as text to the clipboard and pasted also as text from the clipboard (the format is the same as the mask file).

So lets do it step by step: create mask.
Then save mask to file (export) and then try to copy to clipboard. Now check the content of the clipboard (either in Finder, Edit>Show clipboard or try to paste in your editor).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.