[Uml-devel] kdesdk/umbrello/umbrello
Brian Thomas
thomas at mail630.gsfc.nasa.gov
Fri Jan 30 10:59:19 UTC 2004
CVS commit by thomas:
bug fix: classes/interfaces owned by a package where not properly being initializaed in umldocument upon XMI load
M +13 -3 umldoc.cpp 1.123
--- kdesdk/umbrello/umbrello/umldoc.cpp #1.122:1.123
@@ -965,5 +965,5 @@ UMLAssociation* UMLDoc::createUMLAssocia
UMLAssociation *assoc = findAssociation(type, a, b, &swap);
if (assoc == NULL) {
- assoc = new UMLAssociation( type, a, b );
+ assoc = new UMLAssociation(this, type, a, b );
addAssociation(assoc);
}
@@ -1831,4 +1832,13 @@ bool UMLDoc::loadUMLObjectsFromXMI(QDomE
objectList.append( pObject );
}
+
+ // Now, we need to add all the UMLObjects held by the package
+ // should it have any.
+ if (type == "UML:Package") {
+ UMLObjectList oList = ((UMLPackage*) pObject)->containedObjects();
+ for (UMLObject * obj = oList.first(); obj != 0; obj = oList.next())
+ objectList.append(obj);
+ }
+
emit sigSetStatusbarProgress( ++m_count );
node = node.nextSibling();
@@ -1862,7 +1872,7 @@ UMLObject* UMLDoc::makeNewUMLObject(QStr
pObject = new UMLEnum();
} else if (type == "UML:Association") {
- pObject = new UMLAssociation(Uml::at_Unknown, (UMLObject*)NULL, (UMLObject*) NULL);
+ pObject = new UMLAssociation(this, Uml::at_Unknown, (UMLObject*)NULL, (UMLObject*) NULL);
} else if (type == "UML:Generalization") {
- pObject = new UMLAssociation(Uml::at_Generalization, NULL, NULL);
+ pObject = new UMLAssociation(this, Uml::at_Generalization, NULL, NULL);
}
return pObject;
More information about the umbrello-devel
mailing list