subsurface/desktop-widgets/tab-widgets
Berthold Stoeger b19adecb9f Undo: make adding of planned dive undo-able
Planned dives were still added by directly calling core code.
This could confuse the undo-machinery, leading to crashes.

Instead, use the proper undo-command. The problem is that as
opposed to the other AddDive-commands, planned dives may
belong to a trip. Thus, the interface to the AddDive command
was changed to respect the divetrip field. Make sure that
the other callers reset that field (actually, it should never
be set). Add a comment describing the perhaps surprising
interface (the passed-in dive, usually displayed dive, is
reset).

Moreover, a dive cloned in the planner is not assigned a
new number. Thus, add an argument to the AddDive-command,
which expresses whether a new number should be generated
for the to-be-added dive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-10-11 16:22:27 -07:00
..
maintab.cpp Undo: make adding of planned dive undo-able 2018-10-11 16:22:27 -07:00
maintab.h Dive editing: don't repeatedly loop through whole dive list 2018-10-11 16:22:27 -07:00
maintab.ui Use better aliases for icons. 2017-11-30 23:14:46 -08:00
TabBase.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabBase.h Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabDiveExtraInfo.cpp Add SPDX header to desktop widgets 2017-04-29 13:32:55 -07:00
TabDiveExtraInfo.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveExtraInfo.ui Break down MainTab into smaller classes 2017-04-06 18:23:25 -07:00
TabDiveInformation.cpp Dive information: fix surface interval calculation 2018-10-07 05:41:48 +03:00
TabDiveInformation.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveInformation.ui Choose water presets from a qcombobox in planner, custom value possible 2018-03-02 08:38:22 -08:00
TabDivePhotos.cpp Dive media: implement "Open folder of selected media files" 2018-07-20 08:29:27 +02:00
TabDivePhotos.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDivePhotos.ui Implement different zoom levels for dive photos tab 2017-12-18 12:07:10 -08:00
TabDiveStatistics.cpp Statistics: un-globalize stats_selection 2018-10-07 17:50:51 +03:00
TabDiveStatistics.h Cleanup: reinstate override modifiers 2018-09-29 15:23:25 -07:00
TabDiveStatistics.ui Change layout of information and statistics tab... 2017-05-01 21:24:02 -07:00