[Uml-devel] KDE/kdesdk/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Mon Jan 23 13:42:01 UTC 2006


SVN commit 501787 by okellogg:

apply commit 501786 from branches/KDE/3.5

 M  +4 -1      ChangeLog  
 M  +7 -10     umbrello/associationwidget.cpp  


--- trunk/KDE/kdesdk/umbrello/ChangeLog #501786:501787
@@ -1,6 +1,9 @@
 Version 1.5.2
 
-* fix problem reordering methods in classes/interfaces (http://bugs.debian.org/348940)
+* fix problem reordering methods in classes/interfaces (http://bugs.debian.org/348940,
+  http://bugs.kde.org/119991)
+* Bugs/wishes from http://bugs.kde.org:
+* Multiplicity labels positioned incorrectly when moving entities (120598)
 
 Version 1.5.1
 
--- trunk/KDE/kdesdk/umbrello/umbrello/associationwidget.cpp #501786:501787
@@ -1755,17 +1755,14 @@
     int x = 0, y = 0;
 
     if (role == tr_MultiA || role == tr_MultiB) {
+        const bool isHorizontal = (p.y() == q.y());
+        const int atTop = p.y() + SPACE;
+        const int atBottom = p.y() - SPACE - textH;
+        const int atLeft = p.x() - SPACE - textW;
+        const int atRight = p.x() + SPACE;
+        y = (p.y() > q.y()) == isHorizontal ? atTop : atBottom;
+        x = (p.x() < q.x()) == isHorizontal ? atRight : atLeft;
 
-        if( (p.y() > q.y()) != is_top_or_bottom )
-            y = p.y() + SPACE;
-        else
-            y = p.y() - SPACE - textH;
-
-        if( p.x() < q.x() != is_top_or_bottom )
-            x = p.x() + SPACE;
-        else
-            x = p.x() - SPACE - textW;
-
     } else if (role == tr_ChangeA || role == tr_ChangeB) {
 
         if( p.y() > q.y() )




More information about the umbrello-devel mailing list