summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-19 14:29:43 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-19 20:12:59 +0900
commit419434f494e27979f4f904612d7f5be92451c54f (patch)
treefe2b736735b4676d5a61872b00faffe3f0b3b570
parenteaa4e5948ab8506a2a6126a574922b011146d7b7 (diff)
downloadsubsurface-419434f494e27979f4f904612d7f5be92451c54f.tar.gz
Show the dive computer number (if a dive has more than one)
For most users this is no change at all. For the few who download from multiple dive computers this now shows them which of them is the primary dive computer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/profile/profilewidget2.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index da0e37f2b..c1e4fcab3 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -467,7 +467,11 @@ void ProfileWidget2::plotDives(QList<dive *> dives)
event->setVisible(!event->shouldBeHidden());
// qDebug() << event->getEvent()->name << "@" << event->getEvent()->time.seconds << "is hidden:" << event->isHidden();
}
- diveComputerText->setText(currentdc->model);
+ QString dcText = currentdc->model;
+ int nr;
+ if ((nr = number_of_computers(current_dive)) > 1)
+ dcText += tr(" (#%1 of %2)").arg(dc_number + 1).arg(nr);
+ diveComputerText->setText(dcText);
if (MainWindow::instance()->filesFromCommandLine() && animSpeedBackup != -1) {
prefs.animation = animSpeedBackup;
}