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

Ralf Habacker ralf.habacker at gmail.com
Wed Dec 21 07:20:15 UTC 2011


SVN commit 1269647 by habacker:

do not recreate already existant artifacts

 M  +4 -1      import_utils.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/import_utils.cpp #1269646:1269647
@@ -175,7 +175,10 @@
             return 0;
         QFileInfo fi(name);
         UMLFolder *componentView = umldoc->rootFolder(Uml::ModelType::Component);
-        UMLObject *o = Object_Factory::createUMLObject(type, fi.fileName(), componentView, false);
+        UMLObject *o = umldoc->findUMLObjectRaw(componentView, fi.fileName(), type);
+        if (o)
+            return o;
+        o = Object_Factory::createUMLObject(type, fi.fileName(), componentView, false);
         UMLArtifact *a = static_cast<UMLArtifact*>(o);
         a->setDrawAsType(UMLArtifact::file);
         a->setDoc(comment);




More information about the umbrello-devel mailing list