r19092 by jghali - better image position editing when image frame is placed inside groups

scribus-commit scribus-commit at lists.scribus.net
Sat Apr 26 14:33:50 UTC 2014


Author: jghali
Date: Sat Apr 26 14:33:50 2014
New Revision: 19092

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19092
Log:
better image position editing when image frame is placed inside groups

Modified:
    trunk/Scribus/scribus/canvasmode_edit.cpp

Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19092&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Sat Apr 26 14:33:50 2014
@@ -427,13 +427,10 @@
 				else
 				{
 					m_view->setCursor(QCursor(loadIcon("HandC.xpm")));
-					QTransform ro;
-					ro.rotate(-currItem->rotation());
-					QPointF rota = ro.map(QPointF(newX-Mxp,newY-Myp));
-					QTransform mm = currItem->getTransform();
-					double sx, sy;
-					getScaleFromMatrix(mm, sx, sy);
-					currItem->moveImageInFrame((rota.x() / sx) / currItem->imageXScale(), (rota.y() / sy) / currItem->imageYScale());
+					QTransform mm1 = currItem->getTransform();
+					QTransform mm2 = mm1.inverted();
+					QPointF rota = mm2.map(QPointF(newX, newY)) - mm2.map(QPointF(Mxp, Myp));
+					currItem->moveImageInFrame(rota.x() / currItem->imageXScale(), rota.y() / currItem->imageYScale());
 					m_canvas->displayXYHUD(m->globalPos(), currItem->imageXOffset() * currItem->imageXScale(), currItem->imageYOffset() * currItem->imageYScale());
 				}
 				currItem->update();




More information about the scribus-commit mailing list