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

4609: Fix duplicate and copy / paste behavior for linked grous. #4613

Merged
merged 9 commits into from
Sep 22, 2024
Merged

Conversation

kduske
Copy link
Collaborator

@kduske kduske commented Sep 21, 2024

Closes #4609. With this PR, we fix the behavior of duplicate and copy / paste wrt. linked groups, and we unify the behavior as well so that it makes no difference if the user duplicates or copy / pastes objects (unless they modify the map in between copying and pasting nodes.

This makes it easier to write test expectations.
When pasting a linked group with ID x, we want the following benavior:
- if no groups with ID x exist, the pasted group keep its ID
- if one group with ID x exists, the pasted group gets a new ID
- if more than one group with ID x exists, the pasted group keeps its ID

When pasting more than one group with the same ID x, we want them to
remain mutually linked in all cases.
This function makes it easier to extract children of nodes without
exactly knowing their position.
@kduske kduske added this to the 2024.2 milestone Sep 21, 2024
We want duplicate and copy / paste to behave the same in most
situations, so we extend the tests for duplicateObjects to cover copy /
paste as well.
@kduske kduske merged commit 70ee690 into master Sep 22, 2024
11 checks passed
@kduske kduske deleted the 4609 branch September 22, 2024 16:49
@kduske kduske restored the 4609 branch September 22, 2024 16:49
@kduske kduske deleted the 4609 branch September 22, 2024 16:49
@kduske kduske added the release-notes Include this PR in the release notes label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes Include this PR in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

linked groups lose links as sub-groups
1 participant