[Uml-devel] KDE_3_2_BRANCH: kdesdk/umbrello/umbrello
Jonathan Riddell
jri at jriddell.org
Sat Mar 27 11:18:02 UTC 2004
CVS commit by jriddell:
Backport commit from Thu Mar 18 16:50:31 2004
--
CVS commit by okellogg:
Patch from Achim Spangler: Upon load, restore usecases and actors into
the folder in which they were created.
M +18 -2 umllistview.cpp 1.87.2.1
--- kdesdk/umbrello/umbrello/umllistview.cpp #1.87:1.87.2.1
@@ -2147,10 +2147,26 @@ bool UMLListView::loadChildrenFromXMI( U
switch( lvType ) {
+ case Uml::lvt_Actor:
+ case Uml::lvt_UseCase:
+ // check if UMLListViewItem with same nID is already created by
+ // SLOT-EVENT from creation of corresponding UMLObject
+ item = findItem(nID);
+ if ( item != NULL )
+ { // this item shouldn't exist right now - maybe it is created
+ // by the slot event triggered by creation of corresponding
+ // object -> delete wrong created item, as only _now_ all
+ // relevant information is accessible for insertion in UMLListView
+ kdDebug()
+ << "UMLListView::loadChildrenFromXMI() Delete UMLListViewItem instance which was created\
+ before the corresponding loadChildrenFromXMI() call"
+ << endl;
+ delete item;
+ }
+ item = new UMLListViewItem(parent, label, lvType, pObject);
+ break;
case Uml::lvt_Class:
case Uml::lvt_Interface:
case Uml::lvt_Datatype:
case Uml::lvt_Enum:
- case Uml::lvt_Actor:
- case Uml::lvt_UseCase:
case Uml::lvt_Package:
case Uml::lvt_Component:
More information about the umbrello-devel
mailing list