mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user