[Kst] branches/work/kst/portto4/kst/src/libkstapp
Adam Treat
treat at kde.org
Wed Sep 19 18:49:49 CEST 2007
SVN commit 714475 by treat:
* Resize child rotated items by minimizing.
M +8 -4 viewitem.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/viewitem.cpp #714474:714475
@@ -1101,11 +1101,15 @@
bool bottomChanged = oldParentRect.bottom() != newParentRect.bottom();
bool rightChanged = oldParentRect.right() != newParentRect.right();
-#if 0
- //Lock aspect ratio for rotating objects...
- if (viewItem->transform().isRotating()) {
+ //Lock aspect ratio for rotating objects.
+ //Always pick the smaller resize factor so the bounds of the rotated object
+ //do not extend outside of parent.
+
+ //FIXME is the child rotated with respect to the parent is the real question...
+ if (child->transform().isRotating()) {
+ dx = qMin(dx, dy);
+ dy = dx;
}
-#endif
QRectF rect = child->rect();
More information about the Kst
mailing list