Bug 317602 - broken entries in tree view
Summary: broken entries in tree view
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Unclassified
Component: general (show other bugs)
Version: SVN
Platform: Other All
: NOR normal (vote)
Target Milestone: ---
Assignee: Joris Steyn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-30 13:14 UTC by Ralf Habacker
Modified: 2013-11-12 21:44 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.11.2


Attachments
Fix broken entries in tree view (1.60 KB, patch)
2013-09-06 16:56 UTC, Joris Steyn
Details
Fix broken entries in tree view (with cleanup of obsolete code) (5.93 KB, patch)
2013-09-06 19:11 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-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