subsurface/commands
Dirk Hohndel ae12000063 core: clearing dive data should clear undo stack
If we clear out our dive data, we also need to clear out the undo stack
because it otherwise will refer to dives that no longer exist.

The cleanest way to do that would be to do it in the same function used
to clear the dive data. Which causes us to call C++ code from C code and
really is a bit of a mess with a circular dependency between our
libraries.

But this does seem better than relying on people to remember to call
into a second function after clearing the data.

Suggested-by: Michael Andreen <michael@andreen.dev>
Suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2022-04-02 14:04:02 -07:00
..
CMakeLists.txt undo: add device related undo commands 2020-10-25 13:59:04 -07:00
command.cpp Allow editing sensors through equipment tab 2022-03-12 11:24:50 -08:00
command.h Allow editing sensors through equipment tab 2022-03-12 11:24:50 -08:00
command_base.cpp core: clearing dive data should clear undo stack 2022-04-02 14:04:02 -07:00
command_base.h cleanup: fix deprecated QVector constructor 2020-10-26 19:27:03 -07:00
command_device.cpp undo/device: adjust device management infrastructure 2021-08-18 13:22:02 -07:00
command_device.h undo/device: adjust device management infrastructure 2021-08-18 13:22:02 -07:00
command_divelist.cpp profile: don't compile ProfileWidget2 on mobile 2021-12-17 11:54:23 -08:00
command_divelist.h devices: add devices in Command::importTable() 2020-10-24 09:51:37 -07:00
command_divesite.cpp cleanup: copy string in taxonomy_set_[country|category] 2020-09-06 12:59:54 -07:00
command_divesite.h mobile: remove GpsLocation 2021-09-13 11:21:34 -07:00
command_edit.cpp Fix merge problem in EditSensors 2022-03-14 09:34:16 -07:00
command_edit.h Fix merge problem in EditSensors 2022-03-14 09:34:16 -07:00
command_edit_trip.cpp translations: qualify tr function to get correct context 2020-03-22 12:02:48 -07:00
command_edit_trip.h Cleanup: lower-case filenames in core/subsurface-qt/ 2020-02-04 02:16:46 +01:00
command_event.cpp undo: set dive mode to CCR in undo command, not profile code 2021-01-11 09:31:36 -08:00
command_event.h undo: set dive mode to CCR in undo command, not profile code 2021-01-11 09:31:36 -08:00
command_filter.cpp filter: add filter preset undo commands 2020-09-29 16:13:03 -07:00
command_filter.h filter: add filter preset undo commands 2020-09-29 16:13:03 -07:00
command_pictures.cpp undo: fix annoying warning message when deleting pictures 2020-12-19 20:19:51 +01:00
command_pictures.h undo: make adding of pictures undoable 2020-05-06 13:58:09 -07:00