Bug 121886 - Modifying the name of a function makes sequence diagram to freeze
Summary: Modifying the name of a function makes sequence diagram to freeze
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2006-02-13 14:41 UTC by Nicolas Brechet
Modified: 2015-02-26 23:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brechet 2006-02-13 14:41:57 UTC
Version:           1.5.1 (using KDE KDE 3.5.1)
OS:                Linux

Loaded plugins: none

Backtraces: ?

How to Reproduce: create a class in a class diagram, add a function to this class. Create a new sequence diagram, using the function you just created. Then go back to the class diagram, change the name of your function: when you try to use the sequence diagram, nothing happens. But Umbrello doesn't crash, so you just have to delete the sequence diagram, and draw it again...

Expected Behaviour: modifying the name of a function should update every use of this function, in sequence diagram (and others)
Comment 1 Oliver Kellogg 2006-02-13 21:03:51 UTC
SVN commit 509132 by okellogg:

setOperation(): Connect the operation's modified() to the m_pFText's setMessageText().
This is the basic precondition for operation renaming to be propgated from
the list view to the sequence diagram but I haven't been able to reproduce
the reported freezing.
CCBUG:121886


 M  +8 -2      messagewidget.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/messagewidget.cpp #509131:509132
@@ -484,7 +484,11 @@
 }
 
 void MessageWidget::setOperation(UMLOperation *op) {
+    if (m_pObject && m_pFText)
+        disconnect(m_pObject, SIGNAL(modified()), m_pFText, SLOT(setMessageText()));
     m_pObject = op;
+    if (m_pObject && m_pFText)
+        connect(m_pObject, SIGNAL(modified()), m_pFText, SLOT(setMessageText()));
 }
 
 QString MessageWidget::getCustomOpText() {
@@ -815,9 +819,10 @@
     updateResizability();
 
     UMLClassifier *c = dynamic_cast<UMLClassifier*>( pWB->getUMLObject() );
+    UMLOperation *op = NULL;
     if (c) {
         Uml::IDType opId = STR2ID(m_CustomOp);
-        UMLOperation *op = dynamic_cast<UMLOperation*>( c->findChildObjectById(opId, true) );
+        op = dynamic_cast<UMLOperation*>( c->findChildObjectById(opId, true) );
         if (op) {
             // If the UMLOperation is set, m_CustomOp isn't used anyway.
             // Just setting it empty for the sake of sanity.
@@ -839,7 +844,6 @@
                 m_CustomOp = QString::null;
             }
         }
-        setOperation(op);
     }
 
     Uml::IDType textId = STR2ID(textid);
@@ -878,6 +882,8 @@
             << tag << endl;
         }
     }
+    if (op)                // Do it here and not earlier because now we have the
+        setOperation(op);  // m_pFText and setOperation() can make connections.
 
     // always need this
     setLinkAndTextPos();
Comment 2 Oliver Kellogg 2006-03-08 20:39:27 UTC
Can we close this?
Comment 3 Oliver Kellogg 2006-03-08 20:39:52 UTC
Can we close this?
Comment 4 Jonathan Riddell 2006-03-26 01:30:33 UTC
I can still confirm this problem in Umbrello 1.5.2
Comment 5 Oliver Kellogg 2006-03-26 22:18:37 UTC
> I can still confirm this problem in Umbrello 1.5.2 

Since it doesn't happen for me, any further info would be
helpful (for example, a gdb backtrace that shows the calls
involved in the lockup)
Comment 6 FiNeX 2009-08-08 22:15:35 UTC
@Jonathan: can you still reproduce this bug? I've not understand how to reproduce in current trunk.
Comment 7 Ralf Habacker 2015-02-26 23:04:40 UTC
works at least with version 2.15.3