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

[Copy/Paste] Child objects pasted in wrong place #24

Closed
Phillipus opened this issue Feb 13, 2014 · 4 comments
Closed

[Copy/Paste] Child objects pasted in wrong place #24

Phillipus opened this issue Feb 13, 2014 · 4 comments
Labels

Comments

@Phillipus
Copy link
Member

I've improved Copy & Paste of diagram objects but there's still a problem to be fixed.

If child objects (nested) are selected and copied they are pasted at co-ordinates relative to the diagram, not the parent object.

See com.archimatetool.editor.diagram.actions.CopySnapshot class:

private void calculateXYOffset(Point mousePosition) {
        // No mouse click, so increment position by 10,10
        // FIXME: If selected objects are child objects then the offset is relative to the diagram, not the parent objects
        if(mousePosition == null) {
            fXOffSet += 10;
            fYOffSet += 10;
            return;
        }

Anyone like to take a look at this. I'm stumped.

@jbsarrodie
Copy link
Member

Hi Phil,

Don't know if I will find time (my repository plugin makes me very busy) but I should have a look this week.

This makes me think about another issue (don't know if it's still there with the changes you've done): when copy/past nested elements, the relation that exists between parent and child is not kept. I guess this is because there's no relation object shown on the diagram.

Regards

JB

@Phillipus
Copy link
Member Author

"when copy/paste nested elements, the relation that exists between parent and child is not kept. I guess this is because there's no relation object shown on the diagram."

Opened Issue #26 for this.

@jbsarrodie
Copy link
Member

Message moved to Issue #26

@Phillipus
Copy link
Member Author

Fixed in 3b4553b

I am the brain king :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants