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

Oliver Kellogg okellogg at users.sourceforge.net
Thu Jun 7 09:50:04 UTC 2007


SVN commit 672494 by okellogg:

createUMLObject(ot_Datatype): Set parentPkg to Datatypes folder when not given.

 M  +8 -4      object_factory.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/object_factory.cpp #672493:672494
@@ -127,10 +127,14 @@
                            bool solicitNewName /* = true */) {
     UMLDoc *doc = UMLApp::app()->getDocument();
     if (parentPkg == NULL) {
-        Uml::Model_Type mt = Model_Utils::convert_OT_MT(type);
-        kDebug() << "Object_Factory::createUMLObject(" << n << "): "
-            << "parentPkg is not set, assuming Model_Type " << mt << endl;
-        parentPkg = doc->getRootFolder(mt);
+        if (type == Uml::ot_Datatype) {
+            parentPkg = doc->getDatatypeFolder();
+        } else {
+            Uml::Model_Type mt = Model_Utils::convert_OT_MT(type);
+            kDebug() << "Object_Factory::createUMLObject(" << n << "): "
+                << "parentPkg is not set, assuming Model_Type " << mt << endl;
+            parentPkg = doc->getRootFolder(mt);
+        }
     }
     if (!n.isEmpty()) {
         UMLObject *o = doc->findUMLObject(n, type, parentPkg);




More information about the umbrello-devel mailing list