From 6d6d10f03a92a9bac5394fc226c398af61f29d66 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sun, 17 Nov 2019 17:41:23 +0100 Subject: Filter: move calculation of shown dives to undo command The filter-model was catching dives-added / dives-deleted signals from the models to keep track of the number of shown dives. To simplify the data flow, do this directly in the undo-command. Signed-off-by: Berthold Stoeger --- desktop-widgets/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'desktop-widgets/mainwindow.cpp') diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 7b3120ca4..41369f8ec 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -214,6 +214,7 @@ MainWindow::MainWindow() : QMainWindow(), connect(this, &MainWindow::showError, ui.mainErrorMessage, &NotificationWidget::showError, Qt::AutoConnection); connect(&windowTitleUpdate, &WindowTitleUpdate::updateTitle, this, &MainWindow::setAutomaticTitle); + connect(&diveListNotifier, &DiveListNotifier::numShownChanged, this, &MainWindow::setAutomaticTitle); #ifdef NO_PRINTING plannerDetails->printPlan()->hide(); ui.menuFile->removeAction(ui.actionPrint); -- cgit v1.2.3-70-g09d2