mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Update filters on refreshDisplay and remember old selecttions
Update the filters if the list of dives is updated by calling MultiFilterSortModel::instance()->myInvalidate(); This had the side effect of clearing all selections. Thus, in the repopulate() methods of the FilterModels, check those entries that were checked previously. Since all the filter models use the same code, introduce a base class FilterModelBase. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4da6a0a732
commit
dd2466f518
3 changed files with 53 additions and 25 deletions
|
@ -445,7 +445,7 @@ MainWindow *MainWindow::instance()
|
|||
return m_Instance;
|
||||
}
|
||||
|
||||
// this gets called after we download dives from a divecomputer
|
||||
// This gets called after one or more dives were added, edited or downloaded for a dive computer
|
||||
void MainWindow::refreshDisplay(bool doRecreateDiveList)
|
||||
{
|
||||
information()->reload();
|
||||
|
@ -469,6 +469,7 @@ void MainWindow::recreateDiveList()
|
|||
BuddyFilterModel::instance()->repopulate();
|
||||
LocationFilterModel::instance()->repopulate();
|
||||
SuitsFilterModel::instance()->repopulate();
|
||||
MultiFilterSortModel::instance()->myInvalidate();
|
||||
}
|
||||
|
||||
void MainWindow::configureToolbar() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue