diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-01-24 06:54:16 +1200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-24 06:54:16 +1200 |
commit | 6aee901f6fb329b3c8b3945fc394842a921ca2c7 (patch) | |
tree | 60ec9882b4fb94eb62c06d76409ea137d95b21e3 /qt-ui | |
parent | 4487e13e15bcee1f9c1d893dba017045ee4e783c (diff) | |
download | subsurface-6aee901f6fb329b3c8b3945fc394842a921ca2c7.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; |