[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sat Aug 6 10:57:35 UTC 2005


SVN commit 443596 by okellogg:

CCBUG:110216 - I don't know how it could happen, but somehow
this file slipped through the cracks upon the previous commit.


 M  +8 -3      umllistview.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umllistview.cpp #443595:443596
@@ -740,14 +740,19 @@
 
 void UMLListView::childObjectAdded(UMLObject* obj, UMLObject* parent) {
     Uml::Object_Type ot = obj->getBaseType();
-    /* kdDebug() << "UMLListView::childObjectAdded(" << obj->getName()
-    		  << ", type " << ot << "): ID is " << obj->getID() << endl;
-     */
     if (ot == Uml::ot_Stereotype || m_bIgnoreChildCreationSignal) {
         return;
     }
     if (!m_bCreatingChildObject) {
         UMLListViewItem *parentItem = findUMLObject(parent);
+        if (parentItem == NULL) {
+            kdDebug() << "UMLListView::childObjectAdded(" << obj->getName()
+    		  << ", type " << ot << "): parent " << parent->getName()
+                  << " does not yet exist, creating it now." << endl;
+            parentItem = new UMLListViewItem(m_lv, parent->getName(),
+                                             convert_OT_LVT(parent->getBaseType()),
+                                             parent);
+        }
         UMLClassifierListItem *child = static_cast<UMLClassifierListItem*>(obj);
         QString text = child->toString(Uml::st_SigNoScope);
         UMLListViewItem *newItem = new UMLListViewItem(parentItem, text,




More information about the umbrello-devel mailing list