[2014-07-17 00:04:10 -0700] Dirk Hohndel: > On Thu, Jul 17, 2014 at 08:57:05AM +0200, Henrik Brautaset Aronsen wrote: > > On Thu, Jul 17, 2014 at 8:18 AM, Dirk Hohndel <d...@hohndel.org> wrote: > > > > > Henrik just hijacked your thread. > > > > > > BAD Henrik... > > > > > > > Yeah, I know. I'm a rebel. > > Definitely > > I traced this down to commit 887f9e63c3705df52b802420e72f5854d75c8ca6 > Author: Tomaz Canabrava <tomaz.canabr...@intel.com> > Date: Tue Jul 15 15:39:13 2014 -0300 > > Save and restore Dive Planner Settings > > > But I'm too tired and can't think straight. Clearly this messes up the > scaling and everything get's divided by 16.667 and therefore turns to 1. > But why and where (and why are these ints and why the hell can't I think > straight...)
Isn't it as simple as the attached patch? -- Gaetan
>From 59d719b29754c90c42e1a55dd6843024be616669 Mon Sep 17 00:00:00 2001 From: Gaetan Bisson <bis...@archlinux.org> Date: Wed, 16 Jul 2014 21:21:33 -1000 Subject: [PATCH] Fix default ascent/descent rate UNIT_FACTOR had been forgotten there. Signed-off-by: Gaetan Bisson <bis...@archlinux.org> --- qt-ui/diveplanner.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 89c7fcc..e2a375e 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -367,13 +367,13 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) QSettings s; s.beginGroup("Planner"); - prefs.ascrate75 = s.value("ascrate75", 9).toInt(); - prefs.ascrate50 = s.value("ascrate50", 6).toInt(); - prefs.ascratestops = s.value("ascratestops", 6).toInt(); - prefs.ascratelast6m = s.value("ascratelast6m", 1).toInt(); - prefs.descrate = s.value("descrate", 18).toInt(); + prefs.ascrate75 = s.value("ascrate75", 9 * UNIT_FACTOR).toInt(); + prefs.ascrate50 = s.value("ascrate50", 6 * UNIT_FACTOR).toInt(); + prefs.ascratestops = s.value("ascratestops", 6 * UNIT_FACTOR).toInt(); + prefs.ascratelast6m = s.value("ascratelast6m", 1 * UNIT_FACTOR).toInt(); + prefs.descrate = s.value("descrate", 18 * UNIT_FACTOR).toInt(); prefs.bottompo2 = s.value("bottompo2", 1400).toInt(); - prefs.decopo2 = s.value("decopo2",1600).toInt(); + prefs.decopo2 = s.value("decopo2", 1600).toInt(); prefs.doo2breaks = s.value("doo2breaks", false).toBool(); s.endGroup(); -- 2.0.1
_______________________________________________ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface