r21386 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Fri Jun 24 01:11:34 UTC 2016


Author: jghali
Date: Fri Jun 24 01:11:34 2016
New Revision: 21386

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21386
Log:
#14178: Incorrect rotation value displayed in PP when using Rotate Item tool

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

Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21386&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp	Fri Jun 24 01:11:34 2016
@@ -153,6 +153,11 @@
 		pos.setXY(item->xPos(), item->yPos());
 		rotation = newAngle;
 	}
+
+	while (rotation < 0)
+		rotation += 360.0;
+	while (rotation > 360)
+		rotation -= 360.0;
 }
 
 void CanvasMode_Rotate::activate(bool fromGesture)

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21386&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp	(original)
+++ trunk/Scribus/scribus/pageitem.cpp	Fri Jun 24 01:11:34 2016
@@ -1029,6 +1029,10 @@
 	double dR = newRotation - m_rotation;
 	double oldRot = m_rotation;
 	m_rotation = newRotation;
+	while (m_rotation < 0.0)
+		m_rotation += 360.0;
+	while (m_rotation > 360.0)
+		m_rotation -= 360.0;
 	if (drawingOnly || m_Doc->isLoading())
 		return;
 	rotateWelded(dR, oldRot);
@@ -1039,7 +1043,11 @@
 {
 	if (dR==0.0)
 		return;
-	m_rotation+=dR;
+	m_rotation += dR;
+	while (m_rotation < 0.0)
+		m_rotation += 360.0;
+	while (m_rotation > 360.0)
+		m_rotation -= 360.0;
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();




More information about the scribus-commit mailing list