r16934 by fschmid - Implement correct behavior when rotating welded items. Better implementation.

scribus-commit scribus-commit at lists.scribus.net
Tue Oct 25 22:10:52 UTC 2011


Author: fschmid
Date: Tue Oct 25 22:10:51 2011
New Revision: 16934

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16934
Log:
Implement correct behavior when rotating welded items. Better implementation.

Modified:
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pageitem.h

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16934&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Tue Oct 25 22:10:51 2011
@@ -925,11 +925,12 @@
 void PageItem::setRotation(const double newRotation, bool drawingOnly)
 {
 	double dR = newRotation - Rot;
+	double oldRot = Rot;
 	Rot = newRotation;
 	if (drawingOnly || m_Doc->isLoading())
 		return;
 	checkChanges();
-	rotateWelded(dR);
+	rotateWelded(dR, oldRot);
 }
 
 void PageItem::rotateBy(const double dR)
@@ -7148,12 +7149,12 @@
 	}
 }
 
-void PageItem::rotateWelded(double dR)
+void PageItem::rotateWelded(double dR, double oldRot)
 {
 	QTransform ma;
 	ma.translate(xPos(), yPos());
 	ma.scale(1, 1);
-	ma.rotate(rotation());
+	ma.rotate(oldRot);
 	switch (m_Doc->RotMode())
 	{
 		case 2:

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16934&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Tue Oct 25 22:10:51 2011
@@ -1583,7 +1583,7 @@
 	void addWelded(PageItem* iPt);
 	void moveWelded(double DX, double DY, int weld);
 	void moveWelded(double DX, double DY, PageItem* except = NULL);
-	void rotateWelded(double dR);
+	void rotateWelded(double dR, double oldRot);
 };
 
 Q_DECLARE_METATYPE(PageItem*)




More information about the scribus-commit mailing list