diff options
author | Anton Lundin <glance@acc.umu.se> | 2014-07-19 13:36:57 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-19 10:24:07 -0700 |
commit | 60c4587be68c8996bbcc87a1c38bf0b4ca9f9f56 (patch) | |
tree | fe3bc1e502ed2755ec69191061393b9a956776d2 | |
parent | 17bcd1bc6085013877888792754f52ce6b375aea (diff) | |
download | subsurface-60c4587be68c8996bbcc87a1c38bf0b4ca9f9f56.tar.gz |
De-duplicate planner default settings
All other default settings we get from subsurfacestartup.c's
initialization of the prefs struct. The planner had its defaults there
and in the retrieve of the settings from QSettings.
This changes so the defaults for planner settings will be read from the
defaults prefs struct as all other settings.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/diveplanner.cpp | 22 | ||||
-rw-r--r-- | subsurfacestartup.c | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 285347237..4ecf7a9a8 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -365,17 +365,17 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f) QSettings s; s.beginGroup("Planner"); - prefs.ascrate75 = s.value("ascrate75", 9 * 1000.0 / 60.0).toInt(); - prefs.ascrate50 = s.value("ascrate50", 6 * 1000.0 / 60.0).toInt(); - prefs.ascratestops = s.value("ascratestops", 6 * 1000.0 / 60.0).toInt(); - prefs.ascratelast6m = s.value("ascratelast6m", 1 * 1000.0 / 60.0).toInt(); - prefs.descrate = s.value("descrate", 18 * 1000.0 / 60.0).toInt(); - prefs.bottompo2 = s.value("bottompo2", 1400).toInt(); - prefs.decopo2 = s.value("decopo2",1600).toInt(); - prefs.doo2breaks = s.value("doo2breaks", false).toBool(); - prefs.drop_stone_mode = s.value("drop_stone_mode", false).toBool(); - prefs.bottomsac = s.value("bottomsac", 20000).toInt(); - prefs.decosac = s.value("decosac", 17000).toInt(); + prefs.ascrate75 = s.value("ascrate75", prefs.ascrate75).toInt(); + prefs.ascrate50 = s.value("ascrate50", prefs.ascrate50).toInt(); + prefs.ascratestops = s.value("ascratestops", prefs.ascratestops).toInt(); + prefs.ascratelast6m = s.value("ascratelast6m", prefs.ascratelast6m).toInt(); + prefs.descrate = s.value("descrate", prefs.descrate).toInt(); + prefs.bottompo2 = s.value("bottompo2", prefs.bottompo2).toInt(); + prefs.decopo2 = s.value("decopo2", prefs.decopo2).toInt(); + prefs.doo2breaks = s.value("doo2breaks", prefs.doo2breaks).toBool(); + prefs.drop_stone_mode = s.value("drop_stone_mode", prefs.drop_stone_mode).toBool(); + prefs.bottomsac = s.value("bottomsac", prefs.bottomsac).toInt(); + prefs.decosac = s.value("decosac", prefs.decosac).toInt(); s.endGroup(); updateUnitsUI(); diff --git a/subsurfacestartup.c b/subsurfacestartup.c index 29d3ddd11..3e6e9288d 100644 --- a/subsurfacestartup.c +++ b/subsurfacestartup.c @@ -42,8 +42,8 @@ struct preferences default_prefs = { .decopo2 = 1600, .doo2breaks = false, .drop_stone_mode = false, - .bottomsac = 20, - .decosac = 17, + .bottomsac = 20000, + .decosac = 17000, .show_pictures_in_profile = true }; |