From 649b2f2a9ea581e4fbb97a6fd8cc519af880aaf2 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 13 Apr 2020 13:51:57 +0200 Subject: cleanup: don't explicitly clear tabs in MainWindow::selectionChanged() When there is no current dive, mainTab->updateDiveInfo() implicitly clears the tabs. There is no need to call this explicitly. Signed-off-by: Berthold Stoeger --- desktop-widgets/mainwindow.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index efe83ad9b..f3fee7ea5 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -450,11 +450,8 @@ void MainWindow::configureToolbar() void MainWindow::selectionChanged() { - if (!current_dive) { - mainTab->clearTabs(); - mainTab->updateDiveInfo(); - } else { - mainTab->updateDiveInfo(); + mainTab->updateDiveInfo(); + if (current_dive) { configureToolbar(); enableDisableOtherDCsActions(); } -- cgit v1.2.3-70-g09d2