Summary: | classes copy & paste bug in Tree View | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Ralf Habacker <ralf.habacker> |
Component: | general | Assignee: | Joris Steyn <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde, okellogg, ralf.habacker |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | All | ||
Latest Commit: | http://commits.kde.org/umbrello/c4de1a6c78e8f8435aeb5f4ba6477ffdeedbef3d | Version Fixed In: | 4.12.0 |
Attachments: | Fix copy-paste bugs and inconsistencies in tree view |
Description
Ralf Habacker
2012-01-17 09:26:26 UTC
Created attachment 82215 [details]
Fix copy-paste bugs and inconsistencies in tree view
The problem with copy-pasting in the tree view is not limited to the logical view. Also, different behaviour can be observed depending on the type of item copied and what item it's pasted on. Issue 1: Classes and interfaces act as containers in tree view Copy/paste of a class or interface on itself results in a nested hierarchy: -> Logical View ->-> new_class ->->-> new_class This container-like behaviour is only implemented in the tree view, and only when pasting the items on itself. I'll assume pasted classes and interfaces should always be siblings, never children (except when pasted on true containers like folders, packages, etc). Issue 2: Inconsistent rename behaviour When pasting an item (for example, an actor in a use case diagram) on itself, a new item is created with the exact same name. This is different from pasting on the container (the Use Case View in this example) where the rename dialog is shown. Issue 3: Unable to drag all items onto the diagram Either original or pasted items can be dragged onto the diagram, but not both. Attached patch fixes these three issues and a slightly related bug where categories could not be dragged onto ER models. (In reply to comment #2) > The problem with copy-pasting in the tree view is not limited to the logical > view. Also, different behaviour can be observed depending on the type of item > copied and what item it's pasted on. > > Issue 1: Classes and interfaces act as containers in tree view > Copy/paste of a class or interface on itself results in a nested hierarchy: > -> Logical View > ->-> new_class > ->->-> new_class > This container-like behaviour is only implemented in the tree view, and only > when pasting the items on itself. I'll assume pasted classes and interfaces > should always be siblings, never children (except when pasted on true > containers like folders, packages, etc). Actually, years ago there had been enhancement requests to support nested classes, and the existing code was implementing that. Back in the old KDE3 days it did work - but some time later (most likely in the course of migrating to KDE4) it broke, and nobody has fixed it again. Thanks for your patch. Git commit c63e77ca04b691b304a391d5b926ac0f0667e974 by Andi Fischer, on behalf of Joris Steyn. Committed on 08/09/2013 at 19:12. Pushed by fischer into branch 'master'. The problem with copy-pasting in the tree view is fixed. M +10 -5 umbrello/model_utils.cpp M +1 -0 umbrello/umlobject.cpp M +3 -1 umbrello/umlview.cpp http://commits.kde.org/umbrello/c63e77ca04b691b304a391d5b926ac0f0667e974 Git commit c4de1a6c78e8f8435aeb5f4ba6477ffdeedbef3d by Ralf Habacker, on behalf of Joris Steyn. Committed on 08/09/2013 at 19:12. Pushed by habacker into branch 'KDE/4.11'. The problem with copy-pasting in the tree view is fixed. FIXED-IN:4.11.3 M +10 -5 umbrello/model_utils.cpp M +1 -0 umbrello/umlobject.cpp M +3 -1 umbrello/umlview.cpp http://commits.kde.org/umbrello/c4de1a6c78e8f8435aeb5f4ba6477ffdeedbef3d Git commit 1bfad17b6e6891a316ea56ac906980175ae5a058 by Joris Steyn. Committed on 13/10/2013 at 15:09. Pushed by jorissteyn into branch 'master'. Fix copy/paste between Umbrello instances Clip4 now contains all the UMLObjects corresponding to the copied widgets. Some related but obviously unused code removed. Involves a better fix than c63e77c for broken copy/paste of listview items. Related: bug 70926, bug 279788, bug 195803, bug 128068 M +7 -48 umbrello/clipboard/umlclipboard.cpp M +18 -14 umbrello/clipboard/umldragdata.cpp M +6 -0 umbrello/uml.cpp M +0 -111 umbrello/umllistview.cpp M +0 -5 umbrello/umllistview.h M +1 -2 umbrello/umlobject.cpp http://commits.kde.org/umbrello/1bfad17b6e6891a316ea56ac906980175ae5a058 Git commit 9b2d14372905fc49076025488983fb5859637eba by Ralf Habacker, on behalf of Joris Steyn. Committed on 13/10/2013 at 15:09. Pushed by habacker into branch 'KDE/4.12'. Fix copy/paste between Umbrello instances Clip4 now contains all the UMLObjects corresponding to the copied widgets. Some related but obviously unused code removed. Involves a better fix than c63e77c for broken copy/paste of listview items. Related: bug 70926, bug 279788, bug 195803, bug 128068 M +7 -48 umbrello/clipboard/umlclipboard.cpp M +18 -14 umbrello/clipboard/umldragdata.cpp M +6 -0 umbrello/uml.cpp M +0 -111 umbrello/umllistview.cpp M +0 -5 umbrello/umllistview.h M +1 -2 umbrello/umlobject.cpp http://commits.kde.org/umbrello/9b2d14372905fc49076025488983fb5859637eba |