[Kst] extragear/graphics/kst/src/libkstapp
George Staikos
staikos at kde.org
Fri Aug 4 08:24:44 CEST 2006
SVN commit 569523 by staikos:
save a few cycles
M +4 -9 kstgfxmousehandlerutils.cpp
--- trunk/extragear/graphics/kst/src/libkstapp/kstgfxmousehandlerutils.cpp #569522:569523
@@ -70,10 +70,8 @@
newSize.setTopLeft(anchorPoint);
newSize.setBottomRight(npos);
- newSize = newSize.normalize();
- newSize = bounds.intersect(newSize);
-
- return newSize;
+
+ return bounds.intersect(newSize.normalize());
}
@@ -93,8 +91,7 @@
newHalfHeight = kMin(newHalfHeight,anchorPoint.y() - bounds.top());
newHalfHeight = kMin(newHalfHeight,bounds.bottom() - anchorPoint.y());
- QSize newSize;
- newSize = originalRect.size();
+ QSize newSize(originalRect.size());
newSize.scale(2*newHalfWidth,2*newHalfHeight,QSize::ScaleMin);
newRect.setSize(newSize);
@@ -157,9 +154,7 @@
newSize.setBottom(anchorPoint.y() + newHeight);
}
- newSize = newSize.normalize();
-
- return newSize;
+ return newSize.normalize();
}
More information about the Kst
mailing list