Bug 327670

Summary: Behaviour of duplicating a diagram in the tree view
Product: [Applications] umbrello Reporter: Joris Steyn <kde>
Component: generalAssignee: Umbrello Development Group <umbrello-devel>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Joris Steyn 2013-11-15 22:16:20 UTC
This has been broken for quite some time. Does anyone have any thoughts on what the desired behaviour is?

Should all widgets and underlying UMLObjects be duplicated (like copy/pasting all those items individually)? Is that useful? We could also try to implement bug 85807 as the default behaviour of pasting a diagram item in the tree view.

Reproducible: Always

Steps to Reproduce:
1. Place one or more widgets on a diagram (eg. class -> class diagram)
2. Copy the diagram
3. Paste the diagram (to root folder, sub-folder, etc).
Actual Results:  
Umbrello 4.x: diagram does not get copied, only a seemingly random UMLObject is.

current master: OK on first look but diagram tree view item points to old diagram and UMLObjects are not cloned.

Expected Results:  
To be discussed.

What should happen when pasting to other instance of Umbrello seems obvious, see bug 327669.
Comment 1 Joris Steyn 2013-12-17 22:18:01 UTC
Git commit efd686cda1711f0b573f2251e2e7d66765b765ff by Joris Steyn.
Committed on 19/11/2013 at 21:53.
Pushed by jorissteyn into branch 'master'.

Refactor decoding of clip data

Decoding of UMLObjects now uses the same code path on all clips. Fixes that
recently went to clip1 are now also active for clip2 (diagrams). List view
items are never decoded, but created in response of a signal of new UMLObjects.

When pasting clip2 in the same file, only the diagram gets duplicated and not
all contained UMLObjects, like described in feature request 85807.
Related: bug 327910, bug 85807

M  +47   -135  umbrello/clipboard/umlclipboard.cpp
M  +0    -6    umbrello/clipboard/umlclipboard.h
M  +161  -221  umbrello/clipboard/umldragdata.cpp
M  +8    -9    umbrello/clipboard/umldragdata.h
M  +3    -5    umbrello/umldoc.cpp

http://commits.kde.org/umbrello/efd686cda1711f0b573f2251e2e7d66765b765ff
Comment 2 Joris Steyn 2013-12-17 22:18:01 UTC
Git commit c12c81807d4ab64afda7f80bd81b2945b2e7d6b8 by Joris Steyn.
Committed on 17/12/2013 at 21:27.
Pushed by jorissteyn into branch 'master'.

Implement duplication of diagrams

The popup menu of diagram list view items now contain the standard cut/copy
menu entries. A new entry 'Duplicate' allows duplicating a diagram and all
widgets, but not the underlying UML representations.
Related: bug 85807
GUI

M  +2    -3    umbrello/listpopupmenu.cpp
M  +5    -0    umbrello/umllistview.cpp

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