node: added command to remove position from context

This commit is contained in:
itsmattkc
2021-05-28 17:53:40 +10:00
parent d9e45a6818
commit f0068e8c37
2 changed files with 49 additions and 0 deletions
+29
View File
@@ -1445,6 +1445,35 @@ private:
};
class NodeRemovePositionFromContextCommand : public UndoCommand
{
public:
NodeRemovePositionFromContextCommand(Node *node, Node *context) :
node_(node),
context_(context)
{
}
virtual Project * GetRelevantProject() const override
{
return node_->project();
}
virtual void redo() override;
virtual void undo() override;
private:
Node *node_;
Node *context_;
QPointF old_pos_;
bool contained_;
};
}
#endif // NODE_H