Bug 252527

Summary: Duplicating of a Class to rename and modify it later is useless
Product: [Applications] umbrello Reporter: Pedram GANJEH-HADIDI <ganjeh_hadidi>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kde, lynx21.12.12, okellogg
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Pedram GANJEH-HADIDI 2010-09-27 12:15:48 UTC
Version:           unspecified (using KDE 4.4.2) 
OS:                Linux

If you duplicate a class "C1" by COPY & PASTE and rename it to "C2" you will see that then the origin class "C1" has also been renamed to "C2"!!!
If you have two similar classes which have little differences, it sometimes would be faster to Copy & Paste and then Rename the class, then modify the Properties/Functions/...

It seems to me that a Pointer-Copy instead of Deep-Copy is causing this behavior in Diagramms.

This behavior is reproducible in any Class- and ER- Diagramms!
Regards, 

Reproducible: Always

Steps to Reproduce:
Create an Entity or Class
Select Entity or Class
Copy & Paste your selected Entity or Class (CTRL+C, CTRL+V)
Now try to rename the new pasted Class or Entity!

Actual Results:  
Changes to new created (by pasting) Class or Entity results effect also the origin Class or Entity

Expected Results:  
Changes to new created (by pasting) Class or Entity should not have any effect to the origin Class or Entity.
Comment 1 Joris Steyn 2014-01-04 12:47:25 UTC
Shared- vs deep-copy are both useful features.

If you want a "shared copy" of a widget, that means having two widgets pointing to the same UML object representation, use copy/paste on the widget. You can have different styles on the widget, but adding attributes, changing name etc will affect all widgets on all diagrams that belong to the same UML object.

If you want a "deep copy" of a widget, use the "Duplicate" item in the right-click context menu.

I'm closing this bug but please file a new bug if there are still ideas on how we can handle this better.
Comment 2 Joris Steyn 2014-01-04 12:47:33 UTC
*** Bug 195394 has been marked as a duplicate of this bug. ***
Comment 3 Joris Steyn 2014-01-04 12:47:37 UTC
*** Bug 107358 has been marked as a duplicate of this bug. ***