diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-25 19:00:38 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-12-04 13:00:23 +0100 |
commit | 755f185cfcbd3d61457df6fdff32bcf2118f0ab5 (patch) | |
tree | c596b7b00b830a8fed11b661fd4d9de3582337b4 /desktop-widgets/divelistview.h | |
parent | 86f384f932ae04ab17dabadda81d845069f963d7 (diff) | |
download | subsurface-755f185cfcbd3d61457df6fdff32bcf2118f0ab5.tar.gz |
Selection: move selection of "first" dive to core
The DiveListView has a function to select the first dive. Move
this to the core to be able to call it from all parts (not only
desktop) of the code.
Currently, this has a (small?) UI regression: when filtering dives
and no selected dive is visible anymore, the old code would select
the first dive in the list. The new code selects the newest dive,
which might not be the first if some sort-criterion is active.
To revert to the old behavior, it will be necessary to move the
sorting function likewise to the core.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/divelistview.h')
-rw-r--r-- | desktop-widgets/divelistview.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/desktop-widgets/divelistview.h b/desktop-widgets/divelistview.h index 67b1b269b..f7676c58a 100644 --- a/desktop-widgets/divelistview.h +++ b/desktop-widgets/divelistview.h @@ -34,8 +34,6 @@ public: void selectDive(QModelIndex index, bool scrollto = false, bool toggle = false); void selectDive(int dive_table_idx, bool scrollto = false, bool toggle = false); void selectDives(const QList<int> &newDiveSelection); - void selectFirstDive(); - QModelIndex indexOfFirstDive(); void rememberSelection(); void restoreSelection(); void contextMenuEvent(QContextMenuEvent *event); |