From f936776069de719ec545f2862cda411e41ef1d46 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 28 May 2014 10:14:40 -0700 Subject: Try to clear out the profile when dive list is empty This only partially works. If I start from an empty dive list, plan a dive, then abort, there are still leftovers in the profile widget. Hitting Ctrl-W clears that out. But it just runs the same cleanUpEmpty() again... Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 8b012da90..ff932d31b 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -140,6 +140,8 @@ void MainWindow::refreshDisplay(bool doRecreateDiveList) yearlyStatsModel = new YearlyStatisticsModel(); yearlyStats->setModel(yearlyStatsModel); } + if (amount_selected == 0) + cleanUpEmpty(); } void MainWindow::recreateDiveList() -- cgit v1.2.3-70-g09d2