[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/plugins/defaultTools/defaulttool
From: Jan Hambrecht <jaham () gmx ! net>
Date: 2009-06-20 19:25:23
Message-ID: 1245525923.664013.7569.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 984459 by jaham:
use the current selected "hot" position as the resizing center
M +5 -2 DefaultToolWidget.cpp
--- trunk/koffice/plugins/defaultTools/defaulttool/DefaultToolWidget.cpp #984458:984459
@@ -173,10 +173,13 @@
if( rect.width() != newSize.width() || rect.height() != newSize.height() )
{
+ // get the scale/resize center from the position selector
+ QPointF scaleCenter = selection->absolutePosition( positionSelector->position() );
+
QMatrix resizeMatrix;
- resizeMatrix.translate( rect.x(), rect.y() );
+ resizeMatrix.translate( scaleCenter.x(), scaleCenter.y() );
resizeMatrix.scale( newSize.width() / rect.width(), newSize.height() / rect.height() );
- resizeMatrix.translate( -rect.x(), -rect.y() );
+ resizeMatrix.translate( -scaleCenter.x(), -scaleCenter.y() );
QList<KoShape*> selectedShapes = selection->selectedShapes( KoFlake::StrippedSelection );
QList<QSizeF> oldSizes, newSizes;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic