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

Oliver Kellogg okellogg at users.sourceforge.net
Fri Sep 16 01:00:11 UTC 2005


SVN commit 461005 by okellogg:

addEnumLiteral(): Check that the name is not already present in m_List.
BUG:112590


 M  +6 -0      enum.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/enum.cpp #461004:461005
@@ -84,6 +84,12 @@
 }
 
 UMLObject* UMLEnum::addEnumLiteral(const QString &name, Uml::IDType id) {
+    UMLObject *el = UMLCanvasObject::findChildObject(name);
+    if (el != NULL) {
+        kdDebug() << "UMLEnum::addEnumLiteral: " << name
+                  << " is already present" << endl; 
+        return el;
+    }
     UMLEnumLiteral* literal = new UMLEnumLiteral(this, name, id);
     m_List.append(literal);
     emit modified();




More information about the umbrello-devel mailing list