node: set ignore node when positioning and shifting recursively

This commit is contained in:
itsmattkc
2021-04-14 10:13:45 +10:00
parent 51064f44f5
commit 6481304206
2 changed files with 11 additions and 2 deletions
+9 -1
View File
@@ -1351,7 +1351,8 @@ public:
NodeSetPositionAndShiftSurroundingsCommand(Node* node, const QPointF& pos, bool move_dependencies_relatively) :
node_(node),
position_(pos),
move_dependencies_(move_dependencies_relatively)
move_dependencies_(move_dependencies_relatively),
ignore_node_(nullptr)
{}
virtual ~NodeSetPositionAndShiftSurroundingsCommand() override
@@ -1373,6 +1374,11 @@ public:
}
}
void SetIgnoreNode(Node* n)
{
ignore_node_ = n;
}
private:
Node* node_;
@@ -1382,6 +1388,8 @@ private:
QVector<UndoCommand*> commands_;
Node* ignore_node_;
};
class NodeSetPositionAsChildCommand : public UndoCommand