diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2017-10-27 17:52:49 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-10-28 14:16:38 +0200 |
commit | 81492b8cbae8bee18eecaf317cdd01629a3a8130 (patch) | |
tree | 92b46adf1553f1c38579ca710cc989725dd82b82 /desktop-widgets/mainwindow.cpp | |
parent | 215f61175dc2b782592fcae5d48be54029bf6867 (diff) | |
download | subsurface-81492b8cbae8bee18eecaf317cdd01629a3a8130.tar.gz |
Set checked status of menu entry for dive list filter correctly
When enabling the dive list filter via the menu entry
"Log->Filter dives" and then switch off the filter via the small "close"
button of the filter:
Set the checked status of the menu entry correctly.
Also set it correctly when switching on/off via the menu entry to avoid
any situation where it is not synced.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 1afe8b262..93943edcf 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -1945,10 +1945,19 @@ void MainWindow::on_paste_triggered() void MainWindow::on_actionFilterTags_triggered() { - if (ui.multiFilter->isVisible()) + if (ui.multiFilter->isVisible()) { ui.multiFilter->closeFilter(); - else + ui.actionFilterTags->setChecked(false); + } + else { ui.multiFilter->setVisible(true); + ui.actionFilterTags->setChecked(true); + } +} + +void MainWindow::setCheckedActionFilterTags(bool checked) +{ + ui.actionFilterTags->setChecked(checked); } void MainWindow::registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *topRight, QWidget *bottomLeft, QWidget *bottomRight) |