mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-19 14:50:53 +01:00
Add and move terminal strip item are now managed by undo command
This commit is contained in:
@@ -176,7 +176,8 @@ MoveElementsCommand::MoveElementsCommand(
|
||||
DiagramContent::ConductorsToMove |
|
||||
DiagramContent::Images |
|
||||
DiagramContent::Shapes |
|
||||
DiagramContent::ElementTextFields
|
||||
DiagramContent::ElementTextFields |
|
||||
DiagramContent::TerminalStrip
|
||||
);
|
||||
|
||||
setText(
|
||||
@@ -236,13 +237,14 @@ void MoveElementsCommand::move(const QPointF &actual_movement)
|
||||
typedef DiagramContent dc;
|
||||
|
||||
//Move every movable items, except conductor
|
||||
for (QGraphicsItem *qgi : content_to_move.items(dc::Elements
|
||||
| dc::TextFields
|
||||
| dc::Images
|
||||
| dc::Shapes
|
||||
| dc::TextGroup
|
||||
| dc::ElementTextFields
|
||||
| dc::Tables))
|
||||
for (auto &&qgi : content_to_move.items(dc::Elements
|
||||
| dc::TextFields
|
||||
| dc::Images
|
||||
| dc::Shapes
|
||||
| dc::TextGroup
|
||||
| dc::ElementTextFields
|
||||
| dc::Tables
|
||||
| dc::TerminalStrip))
|
||||
{
|
||||
//If curent item have parent, and parent item is in content_to_move
|
||||
//we don't apply movement to this item, because this item will be moved by is parent.
|
||||
|
||||
Reference in New Issue
Block a user