summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 72b4e4720..625c094c1 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -530,10 +530,16 @@ void MainWindow::configureToolbar() {
void MainWindow::selectionChanged()
{
- graphics()->plotDive(nullptr, false, true);
- information()->updateDiveInfo();
- configureToolbar();
- MapWidget::instance()->reload();
+ if (!current_dive) {
+ information()->clearTabs();
+ information()->updateDiveInfo(true);
+ graphics()->setEmptyState();
+ } else {
+ graphics()->plotDive(nullptr, false, true);
+ information()->updateDiveInfo();
+ configureToolbar();
+ MapWidget::instance()->reload();
+ }
}
void MainWindow::on_actionNew_triggered()