diff options
author | Sergey Starosek <sergey.starosek@gmail.com> | 2014-07-17 09:43:58 +0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-16 22:54:52 -0700 |
commit | 387553f0b3abdd836c4dfd8368459a67e56e06a2 (patch) | |
tree | 6196644b38cb618247fc0e74060f5f498f855427 | |
parent | b3e662a895f6106846b236816ea13a458b95ab4a (diff) | |
download | subsurface-387553f0b3abdd836c4dfd8368459a67e56e06a2.tar.gz |
Translate velocity units in planner settings
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/diveplanner.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 9efe80ee1..89c7fccdf 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -436,22 +436,19 @@ PlannerSettingsWidget::~PlannerSettingsWidget() void PlannerSettingsWidget::settingsChanged() { + QString vs; if (get_units()->length == units::FEET) { - ui.ascRate75->setSuffix("ft/min"); - ui.ascRate50->setSuffix("ft/min"); - ui.ascRateStops->setSuffix("ft/min"); - ui.ascRateLast6m->setSuffix("ft/min"); - ui.descRate->setSuffix("ft/min"); + vs.append(tr("ft/min")); ui.lastStop->setText(tr("Last stop at 20ft")); } else { - ui.ascRate75->setSuffix("m/min"); - ui.ascRate50->setSuffix("m/min"); - ui.ascRateStops->setSuffix("m/min"); - ui.ascRateLast6m->setSuffix("m/min"); - ui.descRate->setSuffix("m/min"); + vs.append(tr("m/min")); ui.lastStop->setText(tr("Last stop at 6m")); - } + ui.ascRate75->setSuffix(vs); + ui.ascRate50->setSuffix(vs); + ui.ascRateStops->setSuffix(vs); + ui.ascRateLast6m->setSuffix(vs); + ui.descRate->setSuffix(vs); } void PlannerSettingsWidget::atmPressureChanged(const QString &pressure) |