diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2018-10-21 15:40:25 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-12-14 01:05:18 +0800 |
commit | 89413c5f0779813dab1b63e24aa4b34aebc1e28c (patch) | |
tree | 20c5e4099baf1736f358d6994ccc29a8790cbc49 | |
parent | 8378695d7f79c3ca15634b28ed411484426aac88 (diff) | |
download | subsurface-89413c5f0779813dab1b63e24aa4b34aebc1e28c.tar.gz |
Replace the old filter widget for a new one
Wires the code to display the filter widget on the mainwindow.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 3eb89f152..12c33566b 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -761,9 +761,8 @@ void MainWindow::on_actionClose_triggered() { if (okToClose(tr("Please save or cancel the current dive edit before closing the file."))) { closeCurrentFile(); - // hide any pictures and the filter DivePictureModel::instance()->updateDivePictures(); - ui.multiFilter->closeFilter(); + setApplicationState("Default"); recreateDiveList(); } } @@ -1876,13 +1875,7 @@ void MainWindow::on_paste_triggered() void MainWindow::on_actionFilterTags_triggered() { - if (ui.multiFilter->isVisible()) { - ui.multiFilter->closeFilter(); - ui.actionFilterTags->setChecked(false); - } else { - ui.multiFilter->setVisible(true); - ui.actionFilterTags->setChecked(true); - } + setApplicationState(getCurrentAppState() == "FilterDive" ? "Default" : "FilterDive"); } void MainWindow::setCheckedActionFilterTags(bool checked) |