r16971 by fschmid - Editing the shape of groups works now even when the group is flipped.

scribus-commit scribus-commit at lists.scribus.net
Thu Nov 10 23:31:14 UTC 2011


Author: fschmid
Date: Thu Nov 10 23:31:14 2011
New Revision: 16971

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16971
Log:
Editing the shape of groups works now even when the group is flipped.

Modified:
    trunk/Scribus/scribus/canvasmode_nodeedit.cpp

Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16971&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp Thu Nov 10 23:31:14 2011
@@ -607,6 +607,20 @@
 				npf = FPoint(nx, ny);
 //			npf = FPoint(npf.x() - currItem->xPos(), npf.y() - currItem->yPos());
 			npf = FPoint(npf.x(), npf.y(), currItem->xPos(), currItem->yPos(), currItem->rotation(), 1, 1, true);
+			if (currItem->imageFlippedH())
+			{
+				QTransform p;
+				p.translate(currItem->width(), 0);
+				p.scale(-1, 1);
+				npf = npf.transformPoint(p, false);
+			}
+			if (currItem->imageFlippedV())
+			{
+				QTransform p;
+				p.translate(0, currItem->height());
+				p.scale(1, -1);
+				npf = npf.transformPoint(p, false);
+			}
 			m_doc->nodeEdit.moveClipPoint(currItem, npf);
 		}
 
@@ -1298,6 +1312,20 @@
 				else
 					npf = FPoint(nx, ny);
 				npf = FPoint(npf.x(), npf.y(), currItem->xPos(), currItem->yPos(), currItem->rotation(), 1, 1, true);
+				if (currItem->imageFlippedH())
+				{
+					QTransform p;
+					p.translate(currItem->width(), 0);
+					p.scale(-1, 1);
+					npf = npf.transformPoint(p, false);
+				}
+				if (currItem->imageFlippedV())
+				{
+					QTransform p;
+					p.translate(0, currItem->height());
+					p.scale(1, -1);
+					npf = npf.transformPoint(p, false);
+				}
 				m_doc->nodeEdit.moveClipPoint(currItem, npf);
 				m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
 			}




More information about the scribus-commit mailing list