[PATCH] If set imperial units explicitly on mobile app
Adric Norris
landstander668 at gmail.com
Wed Jan 20 18:27:47 PST 2016
I'm getting the expected results with 4.5.2.689, so it does indeed look
like this fixed it. (-;
On Wed, Jan 20, 2016 at 10:45 AM, Miika Turkia <miika.turkia at gmail.com>
wrote:
> If unit_system is set to imperial, we need to set the units explicitly
> on mobile application.
>
> Fixes #993
>
> Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
> ---
> qt-mobile/qmlmanager.cpp | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
> index d5e5706..ecaca04 100644
> --- a/qt-mobile/qmlmanager.cpp
> +++ b/qt-mobile/qmlmanager.cpp
> @@ -78,6 +78,8 @@ void QMLManager::finishSetup()
> appendTextToLog(QString("loading dives from cache
> failed %1").arg(error));
> } else {
> prefs.unit_system =
> informational_prefs.unit_system;
> + if (informational_prefs.unit_system == IMPERIAL)
> + informational_prefs.units = IMPERIAL_units;
> prefs.units = informational_prefs.units;
> int i;
> struct dive *d;
> @@ -299,6 +301,8 @@ void QMLManager::loadDivesWithValidCredentials()
> return;
> }
> prefs.unit_system = informational_prefs.unit_system;
> + if (informational_prefs.unit_system == IMPERIAL)
> + informational_prefs.units = IMPERIAL_units;
> prefs.units = informational_prefs.units;
> process_dives(false, false);
>
> --
> 2.5.0
>
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
--
"In the beginning the Universe was created. This has made a lot of people
very angry and been widely regarded as a bad move." -Douglas Adams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160120/faf0168c/attachment.html>
More information about the subsurface
mailing list