<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>57878</bug_id>
          
          <creation_ts>2003-04-30 09:10:48 +0000</creation_ts>
          <short_desc>Association line nodes don&apos;t drag along with multiply-selected classes</short_desc>
          <delta_ts>2007-04-18 17:45:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>umbrello</product>
          <component>general</component>
          <version>1.1.1</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>LO</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stevan White">stevan_white</reporter>
          <assigned_to name="Umbrello Development Group">umbrello-devel</assigned_to>
          <cc>jr</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>131201</commentid>
    <comment_count>0</comment_count>
    <who name="Stevan White">stevan_white</who>
    <bug_when>2003-04-30 09:10:48 +0000</bug_when>
    <thetext>Version:           1.1.1 (using KDE KDE 3.1.1)
OS:          Linux

Make 2 classes

Put an association between them

Add a node in the association line, bend the line.

Select the two classes.

Drag the classes.

The classes will move, the node will remain stationary.

If the classes on both ends of the association move, all the nodes in the line should move together.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>131304</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Riddell">jr</who>
    <bug_when>2003-04-30 20:24:50 +0000</bug_when>
    <thetext>*** Bug 57475 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>163915</commentid>
    <comment_count>2</comment_count>
    <who name="Sebastian Stein">seb.kde</who>
    <bug_when>2003-10-04 23:09:03 +0000</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of 57884 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>163917</commentid>
    <comment_count>3</comment_count>
    <who name="Sebastian Stein">seb.kde</who>
    <bug_when>2003-10-04 23:10:26 +0000</bug_when>
    <thetext>sorry, clicked the wrong button, so the bug is still valid </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>179615</commentid>
    <comment_count>4</comment_count>
    <who name="Oliver Kellogg">okellogg</who>
    <bug_when>2003-11-23 22:00:48 +0000</bug_when>
    <thetext>*** Bug has been marked as fixed ***.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>210032</commentid>
    <comment_count>5</comment_count>
    <who name="">YeHaa</who>
    <bug_when>2004-02-26 15:38:45 +0000</bug_when>
    <thetext>Why has this bug been marked as &quot;fixed&quot;? I&apos;m just wondering, since I still see this behaviour in version 1.2 (KDE 3.2).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>214597</commentid>
    <comment_count>6</comment_count>
    <who name="Jonathan Riddell">jr</who>
    <bug_when>2004-03-12 10:18:28 +0000</bug_when>
    <thetext>It works for me.

Jan: if you could give a step by step list of how to recreate this problem that would be useful.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>241071</commentid>
    <comment_count>7</comment_count>
    <who name="Stevan White">stevan_white</who>
    <bug_when>2004-06-13 13:30:54 +0000</bug_when>
    <thetext>I&apos;ll leave this.  I think the current behavior is correct (v. 1.2.1)

The issue was with the method of selection.

If the two classes and the nodes on their association lines are selected 
together by dragging a selection rectangle across all of them, then they 
move together.

If the two classes are selected by shift-clicking on the class icons,
then the node does not move along with the icons.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>490148</commentid>
    <comment_count>8</comment_count>
    <who name="Nicolas Dumoulin">nicolas</who>
    <bug_when>2006-11-28 11:52:43 +0000</bug_when>
    <thetext>Hi

I doesn&apos;t understand the solution. I can&apos;t achieve this.

I have umbrello 1.5.5 on kubuntu edgy.

I create a new class diagramm, I put two classes A and B, and then I put an association between them. If I add a node on the line of their association, and then select the two classes with the node by dragging a selection rectangle, I can only move the class but the node stay at the same place.

In fact, as I begin the move by dragging one of the two classes, the node and the selection are unselected.

What&apos;s wrong ?

It&apos;s a very annoying behavior :-(

Does anyone has the answer ?

Thanks

Nicolas Dumoulin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>491577</commentid>
    <comment_count>9</comment_count>
    <who name="Oliver Kellogg">okellogg</who>
    <bug_when>2006-12-04 21:03:31 +0000</bug_when>
    <thetext>&gt; [...] This is a regression which was introduced in 1.5.4.

Oops, make that 1.5.3 (see http://bugs.kde.org/126391)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>491578</commentid>
    <comment_count>10</comment_count>
    <who name="Oliver Kellogg">okellogg</who>
    <bug_when>2006-12-04 21:45:14 +0000</bug_when>
    <thetext>SVN commit 610642 by okellogg:

mouseMoveEvent(): UMLWidget::adjustAssocs() does not take along association
 line breaks - let&apos;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&apos;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-&gt;m_bSelected &amp;&amp; count &gt; 1) {
             //Single selection is made in release event if the widget wasn&apos;t moved
             m_inMoveArea = true;
+            lastUpdate.start();
             return;
         }
 
@@ -165,7 +166,18 @@
         widget-&gt;getWidgetController()-&gt;moveWidgetBy(diffX, diffY);
 
         if (update) {
+            /* adjustAssocs() does not take along association line breaks:
             widget-&gt;adjustAssocs(widget-&gt;getX(), widget-&gt;getY());
+             ***** instead: */
+            // Move any selected associations.
+            AssociationWidgetList awl = m_widget-&gt;m_pView-&gt;getSelectedAssocs();
+            AssociationWidgetListIt assoc_it(awl);
+            AssociationWidget* assocwidget = NULL;
+            while ((assocwidget = assoc_it.current()) != NULL) {
+                    ++assoc_it;
+                    if (assocwidget-&gt;getSelected())
+                            assocwidget-&gt;moveEntireAssoc(diffX, diffY);
+            }
         }
     }
     m_widget-&gt;m_pView-&gt;resizeCanvasToItems();
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>491580</commentid>
    <comment_count>11</comment_count>
    <who name="Oliver Kellogg">okellogg</who>
    <bug_when>2006-12-04 21:45:26 +0000</bug_when>
    <thetext>SVN commit 610642 by okellogg:

mouseMoveEvent(): UMLWidget::adjustAssocs() does not take along association
 line breaks - let&apos;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&apos;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-&gt;m_bSelected &amp;&amp; count &gt; 1) {
             //Single selection is made in release event if the widget wasn&apos;t moved
             m_inMoveArea = true;
+            lastUpdate.start();
             return;
         }
 
@@ -165,7 +166,18 @@
         widget-&gt;getWidgetController()-&gt;moveWidgetBy(diffX, diffY);
 
         if (update) {
+            /* adjustAssocs() does not take along association line breaks:
             widget-&gt;adjustAssocs(widget-&gt;getX(), widget-&gt;getY());
+             ***** instead: */
+            // Move any selected associations.
+            AssociationWidgetList awl = m_widget-&gt;m_pView-&gt;getSelectedAssocs();
+            AssociationWidgetListIt assoc_it(awl);
+            AssociationWidget* assocwidget = NULL;
+            while ((assocwidget = assoc_it.current()) != NULL) {
+                    ++assoc_it;
+                    if (assocwidget-&gt;getSelected())
+                            assocwidget-&gt;moveEntireAssoc(diffX, diffY);
+            }
         }
     }
     m_widget-&gt;m_pView-&gt;resizeCanvasToItems();
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>494821</commentid>
    <comment_count>12</comment_count>
    <who name="Oliver Kellogg">okellogg</who>
    <bug_when>2006-12-19 06:39:37 +0000</bug_when>
    <thetext>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&apos;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 &quot;uml.h&quot;
 #include &quot;umldoc.h&quot;
 #include &quot;umlview.h&quot;
+#include &quot;umlobject.h&quot;
 #include &quot;listpopupmenu.h&quot;
 #include &quot;classifierwidget.h&quot;
 #include &quot;associationwidget.h&quot;
@@ -162,24 +163,18 @@
 
     while ((widget = it.current()) != 0) {
         ++it;
-
         widget-&gt;getWidgetController()-&gt;moveWidgetBy(diffX, diffY);
+    }
 
-        if (update &amp;&amp; m_widget-&gt;m_bStartMove) {
-            /* adjustAssocs() does not take along association line breaks:
-            widget-&gt;adjustAssocs(widget-&gt;getX(), widget-&gt;getY());
-             ***** instead: */
-            // Move any selected associations.
-            AssociationWidgetList awl = m_widget-&gt;m_pView-&gt;getSelectedAssocs();
-            AssociationWidgetListIt assoc_it(awl);
-            AssociationWidget* assocwidget = NULL;
-            while ((assocwidget = assoc_it.current()) != NULL) {
-                    ++assoc_it;
-                    if (assocwidget-&gt;getSelected())
-                            assocwidget-&gt;moveEntireAssoc(diffX, diffY);
-            }
+    // Move any selected associations.
+    AssociationWidgetList awl = m_widget-&gt;m_pView-&gt;getSelectedAssocs();
+    AssociationWidget *aw = NULL;
+    for (AssociationWidgetListIt ai(awl); (aw = ai.current()) != NULL; ++ai) {
+        if (aw-&gt;getSelected()) {
+            aw-&gt;moveEntireAssoc(diffX, diffY);
         }
     }
+
     m_widget-&gt;m_pView-&gt;resizeCanvasToItems();
     updateSelectionBounds(diffX, diffY);
 }
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>505786</commentid>
    <comment_count>13</comment_count>
    <who name="">bcr</who>
    <bug_when>2007-02-01 19:18:55 +0000</bug_when>
    <thetext>I don&apos;t see how this is considered fixed as I just installed Umbrello from the latest 6.1 Edgy eft and the bug as described above is still there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>506003</commentid>
    <comment_count>14</comment_count>
    <who name="Oliver Kellogg">okellogg</who>
    <bug_when>2007-02-02 19:02:25 +0000</bug_when>
    <thetext>&gt; [...] the bug as described above is still there. 

Go to line 176 in
kdesdk-3.5.6/umbrello/umbrello/umlwidgetcontroller.cpp :

    for (AssociationWidgetListIt ai(awl); (aw = ai.current()) != NULL; ++ai) {
        if (aw-&gt;getSelected()) {
            aw-&gt;moveEntireAssoc(diffX, diffY);  // line 176
        }
    }

If the code does not look like that then you have the wrong umbrello version.
If the code does look like that then please reopen the bug and provide an
exact step-by-step instruction for recreating the problem.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>521416</commentid>
    <comment_count>15</comment_count>
    <who name="Nicolas Dumoulin">nicolas</who>
    <bug_when>2007-04-18 17:45:05 +0000</bug_when>
    <thetext>Hi there,

The bug seems to have disappeared :-)

I&apos;m on Kubuntu feisty with umbrello 1.5.6 and the initial use case works ! The node moves with the classes.

Thanks (a lot) !</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>