mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 16:50:53 +01:00
Les pivotements d'elements sont desormais annulables
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@139 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -104,12 +104,13 @@ void DiagramView::supprimer() {
|
||||
*/
|
||||
void DiagramView::pivoter() {
|
||||
if (scene -> selectedItems().isEmpty()) return;
|
||||
QHash<Element *, QET::Orientation> elements_to_rotate;
|
||||
foreach (QGraphicsItem *item, scene -> selectedItems()) {
|
||||
if (Element *elt = qgraphicsitem_cast<Element *>(item)) {
|
||||
elt -> setOrientation(elt -> orientation().next());
|
||||
elt -> update();
|
||||
if (Element *e = qgraphicsitem_cast<Element *>(item)) {
|
||||
elements_to_rotate.insert(e, e -> orientation().current());
|
||||
}
|
||||
}
|
||||
scene -> undoStack().push(new RotateElementsCommand(elements_to_rotate));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user