mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
77c4b8ef87
commit
b38e2ab485
5 changed files with 91 additions and 74 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue