summaryrefslogtreecommitdiffstats
path: root/profile-widget/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2017-10-20 08:51:20 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-20 06:38:20 -0400
commit022b3e450b278911c2dc9fb1ff211e1ad1230dc8 (patch)
tree284fbb63a095a526baa5b00b1acd2a10acb0a754 /profile-widget/profilewidget2.cpp
parente4a9787c5e6efb408dfb8280f51925e5a512b7d6 (diff)
downloadsubsurface-022b3e450b278911c2dc9fb1ff211e1ad1230dc8.tar.gz
Translate dc text in profile also if string has suffix for > 1 DC
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'profile-widget/profilewidget2.cpp')
-rw-r--r--profile-widget/profilewidget2.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 1d25c8261..a7ac87d77 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -769,17 +769,17 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
event->setVisible(!event->shouldBeHidden());
}
QString dcText = get_dc_nickname(currentdc->model, currentdc->deviceid);
-#ifndef SUBSURFACE_MOBILE
- int nr;
- if ((nr = number_of_computers(&displayed_dive)) > 1)
- dcText += tr(" (#%1 of %2)").arg(dc_number + 1).arg(nr);
-#endif
if (dcText == "planned dive")
dcText = tr("Planned dive");
else if (dcText == "manually added dive")
dcText = tr("Manually added dive");
else if (dcText.isEmpty())
dcText = tr("Unknown dive computer");
+#ifndef SUBSURFACE_MOBILE
+ int nr;
+ if ((nr = number_of_computers(&displayed_dive)) > 1)
+ dcText += tr(" (#%1 of %2)").arg(dc_number + 1).arg(nr);
+#endif
diveComputerText->setText(dcText);
if (haveFilesOnCommandLine() && animSpeedBackup != 0) {
prefs.animation_speed = animSpeedBackup;