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

Oliver Kellogg okellogg at users.sourceforge.net
Tue Dec 19 05:39:39 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-19 06:39 -------
SVN commit 614836 by okellogg:

mouseMoveEvent(): Fix placement of call to AssociationWidget::moveEntireAssoc().
CCBUG:57878


 M  +1 -0      ChangeLog  
 M  +9 -14     umbrello/umlwidgetcontroller.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #614835:614836
 @ -12,6 +12,7  @
 * Optimized printer margins
   http://www.geeksoc.org/~jr/umbrello/uml-devel/9895.html
 * Bugs/wishes from http://bugs.kde.org:
+* Association line nodes don't drag along with multiply-selected classes (57878)
 * Umbrello saves too much copies at xmi (135606)
 * Artifacts of a component diagram are wrongly placed in Deployment View folder (137564)
 * Incorrect export to SQL (138139)
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlwidgetcontroller.cpp #614835:614836
 @ -26,6 +26,7  @
 #include "uml.h"
 #include "umldoc.h"
 #include "umlview.h"
+#include "umlobject.h"
 #include "listpopupmenu.h"
 #include "classifierwidget.h"
 #include "associationwidget.h"
 @ -162,24 +163,18  @
 
     while ((widget = it.current()) != 0) {
         ++it;
-
         widget->getWidgetController()->moveWidgetBy(diffX, diffY);
+    }
 
-        if (update && m_widget->m_bStartMove) {
-            /* 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);
-            }
+    // Move any selected associations.
+    AssociationWidgetList awl = m_widget->m_pView->getSelectedAssocs();
+    AssociationWidget *aw = NULL;
+    for (AssociationWidgetListIt ai(awl); (aw = ai.current()) != NULL; ++ai) {
+        if (aw->getSelected()) {
+            aw->moveEntireAssoc(diffX, diffY);
         }
     }
+
     m_widget->m_pView->resizeCanvasToItems();
     updateSelectionBounds(diffX, diffY);
 }




More information about the umbrello-devel mailing list