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

Oliver Kellogg okellogg at users.sourceforge.net
Sun Jan 14 14:05:02 UTC 2007


SVN commit 623312 by okellogg:

createUMLObject(): If the given name already exists in the Datatypes
then return the object without any reparenting.


 M  +5 -2      import_utils.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/codeimport/import_utils.cpp #623311:623312
@@ -218,8 +218,11 @@
             o = origType;
         }
     } else if (parentPkg && !bPutAtGlobalScope) {
-        if (o->getUMLPackage())
-            o->getUMLPackage()->removeObject(o);
+        UMLPackage *existingPkg = o->getUMLPackage();
+        if (existingPkg == umldoc->getDatatypeFolder())
+            return o;
+        if (existingPkg)
+            existingPkg->removeObject(o);
         o->setUMLPackage(parentPkg);
         parentPkg->addObject(o);
     }




More information about the umbrello-devel mailing list