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

Sharan Rao sharanrao at gmail.com
Mon Feb 18 19:58:07 UTC 2008


SVN commit 776779 by sharan:

Fix crash on operation selection in sequence/collaboration diagram.
Reason why the crash used to happen:
If a new argument is added to an operation which had a datatype that Umbrello has not seen before, Umbrello is supposed to dynamically create that datatype. But that was not happenning due to a regression introduced ( by yours truly :P ), while moving from `for` based iteration to `foreach` based ones. This led to a crash on selection of that particular operation in sequence/collaboration diagrams.

CCBUG:157764



 M  +4 -1      parmpropdlg.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/dialogs/parmpropdlg.cpp #776778:776779
@@ -241,13 +241,16 @@
         }
         UMLClassifierList namesList( m_pUmldoc->getConcepts() );
         UMLClassifier * obj = NULL;
+        bool matchFound = false;
+
         foreach ( obj, namesList) {
             if (obj->getFullyQualifiedName() == typeName) {
                 m_pAtt->setType( obj );
+                matchFound = true;
                 break;
             }
         }
-        if (obj == NULL) {
+        if (!matchFound) {
             // Nothing found: Create a new type on the fly.
             // @todo There should be an extra dialog to decide whether to
             // create a datatype or a class. For now, we create a class.




More information about the umbrello-devel mailing list