Correctly unselect trips when dive list filters change

Oddly Qt left the trips selected (but all dives where unselected in the
UI). This got our internal state rather confused. With this change we
clean up that mess and go back to just having those dives that were
originally selected and are still visible show up as selected.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-11-03 17:52:04 -08:00
parent a3f1dc7681
commit 0dd87989a8
3 changed files with 39 additions and 5 deletions

View file

@ -25,6 +25,7 @@ public:
void reload(DiveTripModel::Layout layout, bool forceSort = true);
bool eventFilter(QObject *, QEvent *);
void unselectDives();
void clearTripSelection();
void selectDive(int dive_table_idx, bool scrollto = false, bool toggle = false);
void selectDives(const QList<int> &newDiveSelection);
void rememberSelection();