[Kst] extragear/graphics/kst/src/libkstapp
Duncan Hanson
duncan.hanson at gmail.com
Wed Aug 2 20:25:47 CEST 2006
SVN commit 569026 by dhanson:
BUG:131740 oh- nevermind, andrew's bug is different. i thought he was actually trying to resize the plots. here's the fix- those pesky 1's again introduced by the definition of width/height for QRects.
M +4 -4 kstgfxmousehandlerutils.cpp
--- trunk/extragear/graphics/kst/src/libkstapp/kstgfxmousehandlerutils.cpp #569025:569026
@@ -114,8 +114,8 @@
if (maintainAspect) {
double newHalfHeight = originalSize.height() * abs(newWidth) / originalSize.width() / 2.0;
- newHalfHeight = kMin(double(movePoint.y() - bounds.top()), newHalfHeight); // ensure we are still within the bounds.
- newHalfHeight = kMin(double(bounds.bottom() - movePoint.y()), newHalfHeight);
+ newHalfHeight = kMin(double(movePoint.y() - bounds.top() + 1), newHalfHeight); // ensure we are still within the bounds.
+ newHalfHeight = kMin(double(bounds.bottom() - movePoint.y() + 1), newHalfHeight);
if (newWidth == 0) { // anything better to be done?
newWidth = 1;
@@ -136,8 +136,8 @@
if (maintainAspect) {
double newHalfWidth = originalSize.width() * abs(newHeight) / originalSize.height() / 2.0;
- newHalfWidth = kMin(double(movePoint.x() - bounds.left()), newHalfWidth);
- newHalfWidth = kMin(double(bounds.right() - movePoint.x()), newHalfWidth);
+ newHalfWidth = kMin(double(movePoint.x() - bounds.left() + 1), newHalfWidth);
+ newHalfWidth = kMin(double(bounds.right() - movePoint.x() + 1), newHalfWidth);
if (newHeight == 0) {
newHeight = 1;
More information about the Kst
mailing list