Bug 327888 - Copy and paste into new instance loses class hierarchy
Summary: Copy and paste into new instance loses class hierarchy
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-21 09:54 UTC by Ralf Habacker
Modified: 2013-12-19 20:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
XMI reproducing the described issue (9.06 KB, application/x-uml)
2013-12-17 22:12 UTC, Joris Steyn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2013-11-21 09:54:05 UTC
When Copy and paste of multiple class diagrams sharing common classes into a new umbrello instance a dialog is printed which says that those classes are already present and asks the user to give a new object name. This may not be what the user want to have.



Reproducible: Always

Steps to Reproduce:
1. open appended file
2. copy and paste the diagrams "File System" and "Gooey" into a new instance

Actual Results:  
On paste of the second diagram the mentioned dialog is displayed and umbrello creates a new object. 

Expected Results:  
The dialog should have an checkbox or button to skip the rename and if choosen umbrello should use the already present class. 

To give the user a smarter paste experience in the case that there are many common classes the dialog should get an additional checkbox to remember the skip decision for this paste.
Comment 1 Joris Steyn 2013-12-17 22:12:33 UTC
Created attachment 84145 [details]
XMI reproducing the described issue

The Engine.xmi file is too large to upload, attached XMI does the same job in reproducing the issue. Paste diagram 1 to other instance, then diagram 2.

Currently, when pasting items twice, the second time they are ignored (the previous instance of the UMLObject is used), so that's all fine. Showing a dialog might be a nice feature, but I don't think there's a common use case.

The actual problem described above is not pasting the same object twice, but pasting completely different objects with the same name. This is caused by not correctly pasting the hierarchy of the objects. See XMI. I think that should be solved in this ticket.
Comment 2 Joris Steyn 2013-12-17 22:15:54 UTC
To elaborate, the Singleton class in Engine.xmi is where the problem occurs when pasting Filesystem and Gooey. Those Singleton classes are completely different objects, so the dialog would not make sense in that situation.
Comment 3 Joris Steyn 2013-12-19 20:18:27 UTC
Bug for improved rename dialog: bug 328949.
Comment 4 Joris Steyn 2013-12-19 20:20:36 UTC
Git commit a5e3fc4612d323a7584d6509d7372be7639a669d by Joris Steyn.
Committed on 18/12/2013 at 07:34.
Pushed by jorissteyn into branch 'master'.

Include object packages in clip

M  +41   -31   umbrello/clipboard/umlclipboard.cpp
M  +2    -0    umbrello/clipboard/umlclipboard.h
M  +28   -27   umbrello/clipboard/umldragdata.cpp
M  +10   -4    umbrello/object_factory.cpp
M  +5    -0    umbrello/umllistview.cpp
M  +0    -15   umbrello/umlobject.cpp
M  +0    -2    umbrello/umlobject.h

http://commits.kde.org/umbrello/a5e3fc4612d323a7584d6509d7372be7639a669d