From 6aee901f6fb329b3c8b3945fc394842a921ca2c7 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 24 Jan 2015 06:54:16 +1200 Subject: [PATCH] Don't show previous dive computer text There were situations when the last text was still shown. E.g. when the current file was closed and then a new dive was imported from CSV. Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index a286c19be..141c7e978 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -626,6 +626,8 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) int nr; if ((nr = number_of_computers(&displayed_dive)) > 1) dcText += tr(" (#%1 of %2)").arg(dc_number + 1).arg(nr); + if (dcText.isEmpty()) + dcText = tr("Unknown dive computer"); diveComputerText->setText(dcText); if (MainWindow::instance()->filesFromCommandLine() && animSpeedBackup != 0) { prefs.animation_speed = animSpeedBackup;