[Uml-devel] [Bug 57878] Association line nodes don't drag along with multiply-selected classes

Oliver Kellogg okellogg at users.sourceforge.net
Mon Dec 4 20:45:21 UTC 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=57878         




------- Additional Comments From okellogg users sourceforge net  2006-12-04 21:45 -------
SVN commit 610642 by okellogg:

mouseMoveEvent(): UMLWidget::adjustAssocs() does not take along association
 line breaks - let's rather use AssociationWidget::moveEntireAssoc() on the
 selected associations. This is a regression which was introduced in 1.5.4.
The behavior is still not perfect - the line break points change relative
 positions during movement. If anybody has a clue what's causing this,
 that would be great.
CCBUG:57878


 M  +12 -0     umlwidgetcontroller.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlwidgetcontroller.cpp #610641:610642
 @ -93,6 +93,7  @
         if (m_widget->m_bSelected && count > 1) {
             //Single selection is made in release event if the widget wasn't moved
             m_inMoveArea = true;
+            lastUpdate.start();
             return;
         }
 
 @ -165,7 +166,18  @
         widget->getWidgetController()->moveWidgetBy(diffX, diffY);
 
         if (update) {
+            /* adjustAssocs() does not take along association line breaks:
             widget->adjustAssocs(widget->getX(), widget->getY());
+             ***** instead: */
+            // Move any selected associations.
+            AssociationWidgetList awl = m_widget->m_pView->getSelectedAssocs();
+            AssociationWidgetListIt assoc_it(awl);
+            AssociationWidget* assocwidget = NULL;
+            while ((assocwidget = assoc_it.current()) != NULL) {
+                    ++assoc_it;
+                    if (assocwidget->getSelected())
+                            assocwidget->moveEntireAssoc(diffX, diffY);
+            }
         }
     }
     m_widget->m_pView->resizeCanvasToItems();




More information about the umbrello-devel mailing list