summaryrefslogtreecommitdiff
path: root/src/gui/undocommands.h
diff options
context:
space:
mode:
authorAleks Kissinger <aleks0@gmail.com>2020-04-13 16:54:08 +0100
committerAleks Kissinger <aleks0@gmail.com>2020-04-13 16:54:08 +0100
commite333ef9cb80e40637235198f9c113fa8cfe0fceb (patch)
tree2ed815077bad29459a1e078c4381f802815604b6 /src/gui/undocommands.h
parent732499eead71b23a7ba551fe788b47a4cf45124e (diff)
split path works
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