From 89413c5f0779813dab1b63e24aa4b34aebc1e28c Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sun, 21 Oct 2018 15:40:25 +0200 Subject: 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 --- desktop-widgets/mainwindow.cpp | 11 ++--------- 1 file 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) -- cgit v1.2.3-70-g09d2