Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate area symbol after editing fill pattern rotation, copy, paste #1828

Closed
dl3sdo opened this issue Dec 27, 2020 · 9 comments · Fixed by #1833
Closed

Duplicate area symbol after editing fill pattern rotation, copy, paste #1828

dl3sdo opened this issue Dec 27, 2020 · 9 comments · Fixed by #1833

Comments

@dl3sdo
Copy link
Member

dl3sdo commented Dec 27, 2020

Steps to reproduce

  1. open forest sample.omap
  2. edit the 409 symbol and make the fill rotation 'adjustable per object'
  3. select one of the existing 409 objects and clone it via copy and paste
  4. rotate the pattern in both the objects, the original and the cloned one
  5. create a new pattern object and rotate its pattern as well
  6. edit the 409 symbol and uncheck 'adjustable per object'

Actual behaviour

The pattern rotation for the original object is reset to north as well as for the newly created one, while the pattern rotation for the cloned object stays the same.
For the pasted object, a new symbol is created and used on paste.

Configuration

Mapper Version: master v20201227.4, v0.9.4

@lpechacek
Copy link
Member

Thanks, Matthias, for the report. I've tried the procedure on my Linux test system and all area objects (cloned/duplicated and new ones) changed the pattern orientation to north after the last step. I'll try on Windows next.

@dg0yt
Copy link
Member

dg0yt commented Dec 28, 2020

Hm, duplicating the object by Copy-and-Paste created a new symbol. That's why changing the property of the original symbol doesn't make a difference...

@dg0yt
Copy link
Member

dg0yt commented Dec 28, 2020

... and it doesn't happen for "Duplicate" tool. @dlsdo I found bugs in the bug report 😄

@dl3sdo
Copy link
Member Author

dl3sdo commented Dec 28, 2020

Actually I didn't use the Duplicate tool, as I was not aware of it. I used copy and paste, and only there it is reproducible.
I should have mentioned that 'cloning' didn't involve using the Duplicate tool.

@dg0yt
Copy link
Member

dg0yt commented Dec 28, 2020

The Duplicate tool is cheap (no clipboard involved).
Copy-and-Paste means saving (exporting) the selected features into XML format, putting the result into the clipboard, and importing from clipboard again - with all difficulties related to import, such as identifying identical symbols and colors. Now the question is why the symbol is different now. The last release modified two related properties: fill pattern rotation and object tags.

@dl3sdo
Copy link
Member Author

dl3sdo commented Dec 28, 2020

If you copy and paste an object where the pattern can be rotated and disable this symbol property afterwards, the pattern can still be rotated for exactly this 'copy&paste' symbol.

@dl3sdo
Copy link
Member Author

dl3sdo commented Dec 28, 2020

1.) open forest sample.omap
2.) edit the 409 symbol and make the fill rotation 'adjustable per object'
3.) select one of the existing 409 objects and clone it via copy and paste
=> a new symbol is added to the symbol set

@dg0yt
Copy link
Member

dg0yt commented Dec 28, 2020

Reproducible also in v0.9.4.

@dg0yt
Copy link
Member

dg0yt commented Dec 28, 2020

AreaSymbol::FillPattern::equal compares the name which is a transient property, set and used by the symbol editor. Editing a symbol creates a name. Copy-and-paste doesn't carry it. Now equal claims that the symbols are different...

dg0yt added a commit that referenced this issue Dec 29, 2020
The name property is transient, only used by the symbol editor UI.
It is not exported or imported. For proper merging of imported
symbols, fill pattern comparison must ignore the name.
Fixes GH-1828 (duplicate symbol after edit, copy, paste).
dg0yt added a commit that referenced this issue Dec 29, 2020
The name property is transient, only used by the symbol editor UI.
It is not exported or imported. For proper merging of imported
symbols, fill pattern comparison must ignore the name.
Fixes GH-1828 (duplicate symbol after edit, copy, paste).
dg0yt added a commit that referenced this issue Dec 29, 2020
The name property is transient, only used by the symbol editor UI.
It is not exported or imported. For proper merging of imported
symbols, fill pattern comparison must ignore the name.
Fixes GH-1828 (duplicate symbol after edit, copy, paste).
@dg0yt dg0yt changed the title fill pattern rotation not reset for cloned objects Duplicate symbol after editing fill pattern rotation, copy, paste Dec 29, 2020
@dg0yt dg0yt added this to the v0.9.5 milestone Dec 29, 2020
@dg0yt dg0yt changed the title Duplicate symbol after editing fill pattern rotation, copy, paste Duplicate area symbol after editing fill pattern rotation, copy, paste Dec 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants