mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Filter: add reference counting for dive-site mode
The dive-site-edit and dive-site-table tabs both put the filter into a special dive-site mode. When switching between both, it could happen that the one got its show befor the other got its hide event. Thus, the first would start dive-site filtering and the second stop it. Now the app was not in filter mode even though it should. To solve this problem, add reference counting for the filter's dive-site mode. In both tabs call the enter/exit functions on show/hide. In the dive-site-table tab, when the selection changes, use a set function that doesn't modify the reference count. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
cd5489e08d
commit
065423896d
4 changed files with 29 additions and 4 deletions
|
|
@ -22,6 +22,7 @@ private slots:
|
|||
private:
|
||||
Ui::TabDiveSite ui;
|
||||
DiveSiteSortedModel model;
|
||||
QVector<dive_site *> selectedDiveSites();
|
||||
void updateFilter();
|
||||
void hideEvent(QHideEvent *) override;
|
||||
void showEvent(QShowEvent *) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue