Skip to content

fix: copy ItemOwnZValue when cloning item#1174

Merged
kaamui merged 1 commit intoOpenBoard-org:devfrom
letsfindaway:fix-z-value-clone-scene
Feb 11, 2025
Merged

fix: copy ItemOwnZValue when cloning item#1174
kaamui merged 1 commit intoOpenBoard-org:devfrom
letsfindaway:fix-z-value-clone-scene

Conversation

@letsfindaway
Copy link
Copy Markdown
Collaborator

This PR should fix #1167

  • for most items, only zValue was copied when cloning
  • now also copy the ItemOwnZValue data property

Notes:

  • It could also be an idea to use UBGraphicsItem::assignZValue() in these cases. which assigns a z value to both, the data property and the item itself. However I'm not sure whether these values could differ while cloning.
  • As the z value is something common to all items, we could also extract copying of this parameter to a base class. However I did not want to introduce such a change here without discussion. There are possibly other such common parameters which should be copied for all item types.

- for most items, only zValue was copied when cloning
- also copy the ItemOwnZValue data property
@kaamui kaamui merged commit e57a65d into OpenBoard-org:dev Feb 11, 2025
@letsfindaway letsfindaway deleted the fix-z-value-clone-scene branch February 12, 2025 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants