Bug 317602

Summary: broken entries in tree view
Product: [Applications] umbrello Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: Joris Steyn <kde>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In: 4.11.2
Sentry Crash Report:
Attachments: Fix broken entries in tree view
Fix broken entries in tree view (with cleanup of obsolete code)

Description Ralf Habacker 2013-03-30 13:14:06 UTC
It is possible to create broken entries in the tree view

Reproducible: Always

Steps to Reproduce:
1. open umbrello
2. right click on the logical view entry in the tree view 
3. select new->Class
4. right click again on the logical view entry 
5. select new->Class
6. drag the second "new class" entry to a diagram
7. drag the first "new class" entry to a diagram,



Actual Results:  
-> 5. there are two object with the name "new_class" in the tree view
-> 6. the second object could be dragged into the diagram
-> 7. the first object could not be dragged into the diagram  (umbrello debug log say ": "new_class" : m_object is NULL)


Expected Results:  
it should not be possible to create an object of the same type with the same name in the tree view.
Comment 1 Joris Steyn 2013-09-06 16:56:19 UTC
Created attachment 82188 [details]
Fix broken entries in tree view
Comment 2 Joris Steyn 2013-09-06 19:11:19 UTC
Created attachment 82196 [details]
Fix broken entries in tree view (with cleanup of obsolete code)

Proposed patch is based on master@ef83cbc.

Adding multiple items of the same type in the tree view resulted in broken items. Fixed by calling createItem() directly when adding an object in treeview. Renaming of items seems to work fine, in contrast to what the commit message of 0d010aa states.
Comment 3 Andi Fischer 2013-09-06 22:55:12 UTC
Git commit d8d333d1f8eae44b45eef94e0d3b9cf80fcbd32f by Andi Fischer, on behalf of Joris Steyn.
Committed on 06/09/2013 at 22:53.
Pushed by fischer into branch 'master'.

Fix broken entries in tree view (with cleanup of obsolete code)

Adding multiple items of the same type in the tree view resulted in broken
items. Fixed by calling createItem() directly when adding an object in
treeview. Renaming of items seems to work fine, in contrast to what the commit
message of 0d010aa states.

M  +7    -23   umbrello/umllistview.cpp
M  +0    -36   umbrello/umllistviewitem.cpp
M  +0    -5    umbrello/umllistviewitem.h

http://commits.kde.org/umbrello/d8d333d1f8eae44b45eef94e0d3b9cf80fcbd32f
Comment 4 Ralf Habacker 2013-09-07 10:46:37 UTC
Git commit f67b681dbeee39787edd5007153aea2621327cac by Ralf Habacker, on behalf of Joris Steyn.
Committed on 06/09/2013 at 22:53.
Pushed by habacker into branch 'KDE/4.11'.

Fix broken entries in tree view (with cleanup of obsolete code)

Adding multiple items of the same type in the tree view resulted in broken
items. Fixed by calling createItem() directly when adding an object in
treeview. Renaming of items seems to work fine, in contrast to what the commit
message of 0d010aa states.
FIXED-IN:4.11.2

M  +7    -23   umbrello/umllistview.cpp
M  +0    -36   umbrello/umllistviewitem.cpp
M  +0    -5    umbrello/umllistviewitem.h

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