[Uml-devel] branches/work/soc-umbrello/umbrello/widgets

Gopala Krishna A krishna.ggk at gmail.com
Tue Aug 18 08:07:10 UTC 2009


SVN commit 1012843 by gopala:

WidgetBase::setID: Generate and set a new unique id in case the param passed
                   is Uml::id_None and it has no underylying UMLObject.


 M  +5 -1      widgetbase.cpp  


--- branches/work/soc-umbrello/umbrello/widgets/widgetbase.cpp #1012842:1012843
@@ -207,10 +207,14 @@
         m_umlObject->setID(id);
     }
     else {
+        if (id == Uml::id_None) {
+            // generate unique id in case of None and also when m_umlObject is null.
+            id = UniqueID::gen();
+        }
         m_widgetInterfaceData->id = id;
     }
 
-    attributeChange(IDHasChanged, ID2STR(id));
+    attributeChange(IDHasChanged, ID2STR(oldId));
 }
 
 /**




More information about the umbrello-devel mailing list