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

Oliver Kellogg okellogg at users.sourceforge.net
Sat Oct 29 23:13:05 UTC 2005


SVN commit 475663 by okellogg:

apply commit 475662 from branches/KDE/3.5


 M  +4 -11     messagewidget.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/messagewidget.cpp #475662:475663
@@ -420,19 +420,12 @@
 
     connect(m_pOw[Uml::A], SIGNAL(sigWidgetMoved(Uml::IDType)), this, SLOT(slotWidgetMoved(Uml::IDType)));
     connect(m_pOw[Uml::B], SIGNAL(sigWidgetMoved(Uml::IDType)), this, SLOT(slotWidgetMoved(Uml::IDType)));
-    if ( ! UMLApp::app()->getDocument()->loading() )
-    { // calculate the dimensions only if no XMI file is loaded
-        // - this functions derives the dimension properties of this widget ( as said by the
-        //   function
-        // - thus it calls also the UMLWidget::adjustAssocs() function - which is bad
-        // Despite in case of a _NEW_ message widget, this calculation is important
-        calculateDimensions();
-    }
 
     connect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::A], SLOT(slotMessageMoved()) );
     connect(this, SIGNAL(sigMessageMoved()), m_pOw[Uml::B], SLOT(slotMessageMoved()) );
     m_pOw[Uml::A] -> messageAdded(this);
     m_pOw[Uml::B] -> messageAdded(this);
+    calculateDimensions();
 
     emit sigMessageMoved();
 }
@@ -515,6 +508,9 @@
     } else {
         kdWarning() << "Unknown message type" << endl;
     }
+    if (! UMLApp::app()->getDocument()->loading()) {
+        adjustAssocs( getX(), getY() );  // adjust assoc lines
+    }
 }
 
 void MessageWidget::calculateDimensionsSynchronous() {
@@ -548,7 +544,6 @@
 
     m_nPosX = x;
     setSize(widgetWidth, widgetHeight);
-    adjustAssocs( getX(), getY() );//adjust assoc lines
 }
 
 void MessageWidget::calculateDimensionsAsynchronous() {
@@ -582,7 +577,6 @@
     widgetWidth -= 2;
     m_nPosX = x;
     setSize(widgetWidth, widgetHeight);
-    adjustAssocs( getX(), getY() );//adjust assoc lines
 }
 
 void MessageWidget::calculateDimensionsCreation() {
@@ -609,7 +603,6 @@
     widgetWidth -= 2;
     m_nPosX = x;
     setSize(widgetWidth, widgetHeight);
-    adjustAssocs( getX(), getY() );//adjust assoc lines
 }
 
 void MessageWidget::cleanup() {




More information about the umbrello-devel mailing list