[Uml-devel] kdesdk/umbrello/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Thu Mar 18 08:50:13 UTC 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.89
--- kdesdk/umbrello/umbrello/umllistview.cpp #1.88:1.89
@@ -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