summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-13 13:51:57 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-05-03 14:47:49 -0700
commit649b2f2a9ea581e4fbb97a6fd8cc519af880aaf2 (patch)
tree3186783d62ad727377171d5f18345f2499957904
parent17556cc66cedc84aaf6de2bfabcafbcca8bda53c (diff)
downloadsubsurface-649b2f2a9ea581e4fbb97a6fd8cc519af880aaf2.tar.gz
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 <bstoeger@mail.tuwien.ac.at>
-rw-r--r--desktop-widgets/mainwindow.cpp7
1 files changed, 2 insertions, 5 deletions
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();
}