[Uml-devel] KDE/kdesdk/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Tue Dec 19 05:49:05 UTC 2006


SVN commit 614838 by okellogg:

merge r614836 from branches/KDE/3.5

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


--- trunk/KDE/kdesdk/umbrello/ChangeLog #614837:614838
@@ -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)
--- trunk/KDE/kdesdk/umbrello/umbrello/umlwidgetcontroller.cpp #614837:614838
@@ -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) {
-            /* 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