now ConductorTextItem rotation is only save to XML if he was rotate by user

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2264 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2013-06-13 18:01:35 +00:00
parent 6b3f027625
commit 1a3462d9b4

View File

@@ -950,7 +950,10 @@ bool Conductor::fromXml(QDomElement &e) {
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 @@ QDomElement Conductor::toXml(QDomDocument &d, QHash<Terminal *, int> &table_adr_
// 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()) {