selection: when changing current dive make sure it is selected

When an undo command selected invisible dives, a current dive outside
of the list of selected dives was chosen. This could have the very
unfortunate effect that the current dive was set, though not selected.
From an UI point of view this meant that the dive was displayed, but
edits would not be registered.

Change the setClosestCurrentDive function to select the current dive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Berthold Stoeger 2020-09-20 14:48:15 +02:00 committed by Dirk Hohndel
parent 43390d4a9a
commit f42dee8ac2
3 changed files with 10 additions and 3 deletions

View file

@ -10,6 +10,8 @@ New in _Subsurface_ 4.9.7
- profile: improve resolution in printing and export
- core: fix renumbering of imported dives [#2731]
- core: fix broken merging of dives with multiple cylinders
- core: make sure current dive is always selected [#2961]
- core: update filter status when loading dive list [#2961]
- bluetooth/rfcomm: fix broken classic BT downloads on Linux and Windows; macOS is still broken
- media: read timestamp from mvhd atom of QuickTime/MP4 style videos
- planner: properly initialize salinity