mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 22:46:16 +00:00
Mobile/filtering: simplify the filter toggle
Simply make it always reset the filter. There's no point remembering the last filter pattern and explicitly setting it, if the last thing we do is to reset this pattern. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
466a0bf758
commit
b0a0e1e374
1 changed files with 1 additions and 6 deletions
|
@ -510,12 +510,7 @@ Kirigami.ScrollablePage {
|
|||
text: qsTr("Filter dives")
|
||||
onTriggered: {
|
||||
rootItem.filterToggle = !rootItem.filterToggle
|
||||
if (rootItem.filterToggle) {
|
||||
diveModel.setFilter(rootItem.filterPattern)
|
||||
} else {
|
||||
diveModel.resetFilter()
|
||||
rootItem.filterPattern = ""
|
||||
}
|
||||
diveModel.resetFilter()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue