[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sat May 22 16:25:01 UTC 2004


CVS commit by okellogg: 

loadFromXMI(): Do not add operations/attributes/enumliterals, they are added
 at their parent classifier elsewhere.
 If inside package, add object at package - else add object at UMLDoc.


  M +13 -8     umlobject.cpp   1.35


--- kdesdk/umbrello/umbrello/umlobject.cpp  #1.34:1.35
@@ -475,11 +475,16 @@ bool UMLObject::loadFromXMI( QDomElement
         }
 
+        // Operations, attributes, and enum literals get added and signaled
+        // elsewhere.
+        if (m_BaseType != ot_Operation && m_BaseType != ot_Attribute &&
+            m_BaseType != ot_EnumLiteral) {
         if (m_pUMLPackage)
                 m_pUMLPackage->addObject(this);
+                else
+                        umldoc->addUMLObject(this);
         // Associations and their role objects do not have a listview
         // representation yet, therefore they do not prompt the
         // sigObjectCreated.
-        if (m_BaseType != ot_Association && m_BaseType != ot_UMLObject) {
-                umldoc->addUMLObject(this);
+                if (m_BaseType != ot_Association && m_BaseType != ot_UMLObject)
                 umldoc->signalUMLObjectCreated(this);
         }






More information about the umbrello-devel mailing list