diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-06-03 21:08:49 +0900 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-06-03 21:08:49 +0900 |
commit | b38e2ab485756e33d4d8bbab8baf1969405a1d90 (patch) | |
tree | c3ac889102b6da5ad4c62fd02cbeb697c36c4028 /qt-ui/mainwindow.cpp | |
parent | 77c4b8ef87fcbf0fd6be7cdd7581035bb96f0b58 (diff) | |
download | subsurface-b38e2ab485756e33d4d8bbab8baf1969405a1d90.tar.gz |
Tie all the pieces together and make Preferences work as intended
Not Apply / Close without Saving / OK work as designed. And things get
correctly stored and reset.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index f1004c556..d8b73d636 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -379,10 +379,13 @@ void MainWindow::readSettings() settings.endGroup(); settings.beginGroup("Units"); if (settings.value("unit_system").toString() == "metric") { + prefs.unit_system = METRIC; prefs.units = SI_units; } else if (settings.value("unit_system").toString() == "imperial") { + prefs.unit_system = IMPERIAL; prefs.units = IMPERIAL_units; } else { + prefs.unit_system = PERSONALIZE; GET_UNIT(v, "length", length, units::FEET, units::METERS); GET_UNIT(v, "pressure", pressure, units::PSI, units::BAR); GET_UNIT(v, "volume", volume, units::CUFT, units::LITER); |