[qet] [2264] now ConductorTextItem rotation is only save to XML if he was rotate by user

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 2264
Author:   blacksun
Date:     2013-06-13 20:01:35 +0200 (Thu, 13 Jun 2013)
Log Message:
-----------
now ConductorTextItem rotation is only save to XML if he was rotate by user  

Modified Paths:
--------------
    trunk/sources/conductor.cpp

Modified: trunk/sources/conductor.cpp
===================================================================
--- trunk/sources/conductor.cpp	2013-06-13 17:42:37 UTC (rev 2263)
+++ trunk/sources/conductor.cpp	2013-06-13 18:01:35 UTC (rev 2264)
@@ -950,7 +950,10 @@
 		text_item -> forceMovedByUser(true);
 		text_item -> setPos(user_pos_x, user_pos_y);
 	}
-	text_item -> setRotationAngle(e.attribute("rotation").toDouble());
+	if (e.hasAttribute("rotation")) {
+		text_item -> setRotationAngle(e.attribute("rotation").toDouble());
+		text_item -> forceRotateByUser(true);
+	}
 	
 	// parcourt les elements XML "segment" et en extrait deux listes de longueurs
 	// les segments non valides sont ignores
@@ -1045,7 +1048,7 @@
 	
 	// exporte la "configuration" du conducteur
 	properties_.toXml(e);
-	if (text_item -> rotationAngle()) {
+	if (text_item -> wasRotateByUser()) {
 		e.setAttribute("rotation", QString("%1").arg(text_item -> rotationAngle()));
 	}
 	if (text_item -> wasMovedByUser()) {


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/