From d44787a0b33d96541c34b218f40ed69f58c02794 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Fri, 24 Feb 2023 23:46:23 +1300 Subject: [PATCH] Desktop: Fix units displayed for 'Near dive sites' range. Fix a bug causing the wrong units (m) to be shown on the Dive site management view if imperial units are as the system default. Signed-off-by: Michael Keller --- desktop-widgets/locationinformation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index 67669f1b1..9f11c3137 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -43,7 +43,6 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo connect(&diveListNotifier, &DiveListNotifier::diveSiteChanged, this, &LocationInformationWidget::diveSiteChanged); connect(&diveListNotifier, &DiveListNotifier::diveSiteDeleted, this, &LocationInformationWidget::diveSiteDeleted); connect(qPrefUnits::instance(), &qPrefUnits::unit_systemChanged, this, &LocationInformationWidget::unitsChanged); - unitsChanged(); ui.diveSiteListView->setModel(&filter_model); ui.diveSiteListView->setModelColumn(LocationInformationModel::NAME); @@ -244,6 +243,8 @@ void LocationInformationWidget::initFields(dive_site *ds) filter_model.set(0, zero_location); clearLabels(); } + + unitsChanged(); } void LocationInformationWidget::on_GPSbutton_clicked()