Dive list: remember selected dives

Don't delesect dives, when unregistering them from the backend.
If a previously selected dive is added, select it in the dive-list.
For this purpose introduce a SELECTED_ROLE to query the DiveTripModel
for selected dives.

Unfortunately, when adding multiple selected dives, current_dive_changed
is called for each of them, making this very slow. This will have
to be fixed in subsequent commits.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-08-01 10:47:09 +02:00 committed by Dirk Hohndel
parent 96d8727399
commit 0d98da5261
4 changed files with 29 additions and 12 deletions

View file

@ -88,7 +88,8 @@ public:
DIVE_ROLE,
TRIP_ROLE,
SORT_ROLE,
DIVE_IDX
DIVE_IDX,
SELECTED_ROLE
};
enum Layout {
TREE,