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>
This commit is contained in:
Dirk Hohndel 2015-01-24 06:54:16 +12:00
parent 4487e13e15
commit 6aee901f6f

View file

@ -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;