diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-03-05 09:00:00 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-10 09:25:57 -0700 |
commit | 0212b1b9f7734c2ee4edaf7e27a2c25601b5c4bc (patch) | |
tree | 6c3120611aa8b41948b6a96cc0f67d7cfd07b23d /commands/command_base.h | |
parent | 8ce4e10ccb98558886ef4ead4554f44345acd603 (diff) | |
download | subsurface-0212b1b9f7734c2ee4edaf7e27a2c25601b5c4bc.tar.gz |
undo infrastructure: improve undo command texts
For many of the commands it is fairly easy to add information that makes
it easier to figure out what actually happened. That's especially true
for commands operating on dives. Trip and dive site edits haven't been
given these more elaborate undo texts (yet).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'commands/command_base.h')
-rw-r--r-- | commands/command_base.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/command_base.h b/commands/command_base.h index 59c3cd412..ffc6c4e91 100644 --- a/commands/command_base.h +++ b/commands/command_base.h @@ -172,7 +172,12 @@ public: // If nothing is to be done, the command will be deleted and false is returned. bool execute(Base *cmd); +// helper function to create more meaningful undo/redo texts (and get the list +// of those texts for the git storage commit message) QUndoStack *getUndoStack(); +QString diveNumberOrDate(struct dive *d); +QString getListOfDives(const std::vector<dive *> &dives); +QString getListOfDives(QVector<struct dive *> dives); } // namespace Command |