[Kst] [Bug 131740] Problem with resizing while maintaining aspect ratio
Duncan Hanson
duncan.hanson at gmail.com
Wed Aug 2 20:28:40 CEST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=131740
duncan.hanson gmail com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From duncan.hanson gmail com 2006-08-02 20:28 -------
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