mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 23:20:52 +01:00
Editor commands: change the rotation with the space key on the keyboard
from 90° to 15° for more precision for part lines, polygons, texts, arcs and circles.
This commit is contained in:
@@ -633,14 +633,14 @@ void RotateElementsCommand::undo()
|
|||||||
}
|
}
|
||||||
else if (item->type() == PartLine::Type) {
|
else if (item->type() == PartLine::Type) {
|
||||||
PartLine* line = qgraphicsitem_cast<PartLine*>(item);
|
PartLine* line = qgraphicsitem_cast<PartLine*>(item);
|
||||||
line->setRotation(line->rotation()-90);
|
line->setRotation(line->rotation()-15);
|
||||||
}
|
}
|
||||||
else if (item->type() == PartPolygon::Type) {
|
else if (item->type() == PartPolygon::Type) {
|
||||||
PartPolygon* poly = qgraphicsitem_cast<PartPolygon*>(item);
|
PartPolygon* poly = qgraphicsitem_cast<PartPolygon*>(item);
|
||||||
poly->setRotation(poly->rotation()-90);
|
poly->setRotation(poly->rotation()-15);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
item->setRotation(item->rotation()-90);
|
item->setRotation(item->rotation()-15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -661,14 +661,14 @@ void RotateElementsCommand::redo()
|
|||||||
}
|
}
|
||||||
else if (item->type() == PartLine::Type) {
|
else if (item->type() == PartLine::Type) {
|
||||||
PartLine* line = qgraphicsitem_cast<PartLine*>(item);
|
PartLine* line = qgraphicsitem_cast<PartLine*>(item);
|
||||||
line->setRotation(line->rotation()+90);
|
line->setRotation(line->rotation()+15);
|
||||||
}
|
}
|
||||||
else if (item->type() == PartPolygon::Type) {
|
else if (item->type() == PartPolygon::Type) {
|
||||||
PartPolygon* poly = qgraphicsitem_cast<PartPolygon*>(item);
|
PartPolygon* poly = qgraphicsitem_cast<PartPolygon*>(item);
|
||||||
poly->setRotation(poly->rotation()+90);
|
poly->setRotation(poly->rotation()+15);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
item->setRotation(item->rotation()+90);
|
item->setRotation(item->rotation()+15);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user