summaryrefslogtreecommitdiff
path: root/src/gui/undocommands.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/undocommands.h')
-rw-r--r--src/gui/undocommands.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/undocommands.h b/src/gui/undocommands.h
index a1daa07..00b9a40 100644
--- a/src/gui/undocommands.h
+++ b/src/gui/undocommands.h
@@ -271,4 +271,19 @@ private:
QMap<Edge*,GraphElementData*> _oldEdgeData;
};
+class SplitPathCommand : public GraphUpdateCommand
+{
+public:
+ explicit SplitPathCommand(TikzScene *scene,
+ const QVector<Path*> &paths,
+ QUndoCommand *parent = nullptr);
+ void undo() override;
+ void redo() override;
+private:
+ QVector<Path*> _paths;
+
+ // keep a copy of the edge lists so they can be added back to each path in undo()
+ QVector<QVector<Edge*>> _edgeLists;
+};
+
#endif // UNDOCOMMANDS_H