[Uml-devel] kdesdk/umbrello/umbrello

Brian Thomas thomas at mail630.gsfc.nasa.gov
Fri Jan 30 17:01:45 UTC 2004


CVS commit by thomas: 

bug fix: when floating text block of role belonging to association is moved, the parent association is recalculated..and it shouldnt be. Similarly, moving vertice of selected association screws up floating text box position..and it shouldnt be concerned. Both problems now fixed


  M +21 -3     umlwidget.cpp   1.71


--- kdesdk/umbrello/umbrello/umlwidget.cpp  #1.70:1.71
@@ -279,5 +279,6 @@ void UMLWidget::mouseMoveEvent(QMouseEve
                         calls_to_calc_head = 0;
 #endif
-                        adjustAssocs(newX, newY);
+                        //adjustAssocs(newX, newY);
+                        adjustUnselectedAssocs(newX, newY);
 #ifdef DEBUG_ASSOCLINES
                         kdDebug() << "calls_to_calc_head = " << calls_to_calc_head << endl;
@@ -391,6 +392,12 @@ void UMLWidget::mouseReleaseEvent(QMouse
                 // Adjust assoc lines again - when the widget is moved around
                 // quickly the lastUpdate timer may have not yet fired.
-                adjustAssocs( getX(), getY() );
+                //
+                // COMMENT: I *dont* think the full adjustAssocs is needed. It certainly screws
+                // up the display when a role floating text box belonging to that assoc
+                // is moved.  Ithink  its best to do noting here. -b.t.
 
+                // adjustUnselectedAssocs( getX(), getY() );
+
+                // BUT DO do this..so that if we quit right now, we are asked to save
                 m_pView->getDocument()->setModified(true);
         }
@@ -712,4 +719,15 @@ void UMLWidget::adjustAssocs(int x, int 
 }
 
+void UMLWidget::adjustUnselectedAssocs(int x, int y)
+{
+        AssociationWidgetListIt assoc_it(m_Assocs);
+        AssociationWidget* assocwidget = 0;
+        while((assocwidget=assoc_it.current())) {
+                ++assoc_it;
+                if(!assocwidget->getSelected())
+                        assocwidget->widgetMoved(this, x, y);
+        }
+}
+
 void UMLWidget::startPopupMenu(QPoint At) {
         slotRemovePopupMenu();






More information about the umbrello-devel mailing list