mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 06:20:53 +01:00
element-editor: add rotation-functions to "text" and "dynamic_text"
This commit is contained in:
@@ -547,6 +547,14 @@ void RotateElementsCommand::undo()
|
||||
PartPolygon* poly = qgraphicsitem_cast<PartPolygon*>(item);
|
||||
poly->setRotation(-90);
|
||||
}
|
||||
else if (item->type() == PartText::Type) {
|
||||
PartText* text = qgraphicsitem_cast<PartText*>(item);
|
||||
text->setRotation(-90);
|
||||
}
|
||||
else if (item->type() == PartDynamicTextField::Type) {
|
||||
PartDynamicTextField* dyntext = qgraphicsitem_cast<PartDynamicTextField*>(item);
|
||||
dyntext->setRotation(-90);
|
||||
}
|
||||
else {
|
||||
item->setRotation(item->rotation()-90);
|
||||
}
|
||||
@@ -584,6 +592,14 @@ void RotateElementsCommand::redo()
|
||||
PartPolygon* poly = qgraphicsitem_cast<PartPolygon*>(item);
|
||||
poly->setRotation(+90);
|
||||
}
|
||||
else if (item->type() == PartText::Type) {
|
||||
PartText* text = qgraphicsitem_cast<PartText*>(item);
|
||||
text->setRotation(+90);
|
||||
}
|
||||
else if (item->type() == PartDynamicTextField::Type) {
|
||||
PartDynamicTextField* dyntext = qgraphicsitem_cast<PartDynamicTextField*>(item);
|
||||
dyntext->setRotation(+90);
|
||||
}
|
||||
else {
|
||||
item->setRotation(item->rotation()+90);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user