[Kst] extragear/graphics/kst/src/libkstapp

Andrew Walker arwalker at sumusltd.com
Tue Aug 1 02:09:22 CEST 2006


SVN commit 568394 by arwalker:

BUG:131625 Correctly normalize the new QRect

 M  +11 -0     kstgfxmousehandlerutils.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kstgfxmousehandlerutils.cpp #568393:568394
@@ -152,6 +152,17 @@
       newSize.setRight(anchorPoint.x() - int(newHalfWidth));
     }
 
+  if (newSize.width() < 0) {
+    int width = newSize.width();
+    newSize.setLeft(newSize.left() + width);
+    newSize.setRight(width * -1);
+  }
+  if (newSize.height() < 0) {
+    int height = newSize.height();
+    newSize.setTop(newSize.top() + height);
+    newSize.setHeight(height * -1);
+  }
+      
     newSize = newSize.normalize();
 
     return newSize;


More information about the Kst mailing list