diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-03 22:54:54 +0100 |
---|---|---|
committer | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-07 00:13:35 +0200 |
commit | 33fb6461fbe7e389081e77853e63638a1a343623 (patch) | |
tree | b45c374e565ce03a44b54860580e1413ba15090f /profile-widget/profilewidget2.cpp | |
parent | 7018783f64f664af97032da4ba4d357c05b52aaf (diff) | |
download | subsurface-33fb6461fbe7e389081e77853e63638a1a343623.tar.gz |
undo: add undo command for dive-mode switch
This basically copies the bookmark code, with the addition that
the dive mode is recorded in the text of the undo command.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r-- | profile-widget/profilewidget2.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index 54881f71a..76822c196 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -1606,10 +1606,7 @@ void ProfileWidget2::addBookmark(int seconds) void ProfileWidget2::addDivemodeSwitch(int seconds, int divemode) { - add_event(current_dc, seconds, SAMPLE_EVENT_BOOKMARK, 0, divemode, QT_TRANSLATE_NOOP("gettextFromC", "modechange")); - invalidate_dive_cache(current_dive); - mark_divelist_changed(true); - replot(); + Command::addEventDivemodeSwitch(current_dive, dc_number, seconds, divemode); } void ProfileWidget2::addSetpointChange(int seconds) |