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
Copy paste with parent items #317
Conversation
2d77341
to
4cc724b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This look great! Do you know why the builds are failing?
It's failing when I update the relationship for UseCase.subject to bi-directional. Other end is |
4cc724b
to
07d55b4
Compare
07d55b4
to
6500d23
Compare
(looks like top and left padding are multiplied by 2) |
Thanks a lot for testing this. I see what’s going on: as part of a paste action, the offset of the elements is changed by 10 pixels. This way it’s clear to a user the new item is pasted. Hoever, it also applies this offset to the nested items. That should not be the case, of course. The offset should only be applied to elements if the parent element is not part of the past action. |
Fixed it in 74c82d4. |
i still find it a bit weird what the whole copy-pasted fragment is padded extra 10px, i'd probably would make some sort of dotted line highlight around pasted elements, unless you click once somewhere but that's not a blocker anymore, thanks a lot for your work! |
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Items, part of a super item, such as Components in a Node, are not copied properly.
Issue Number: #286
What is the new behavior?
Note that items are still pasted relative to the item position (position to the parent). Gaphor still needs some work so pasted items are always pasted inside the canvas' view port.
Does this PR introduce a breaking change?