diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2017-11-21 15:52:01 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-11-24 07:56:10 -0800 |
commit | bd8830672269297f7030670e10f2191ac824093f (patch) | |
tree | 36bea72af67273a7516a8d473616995b5bef96b7 /core/subsurface-qt/SettingsObjectWrapper.cpp | |
parent | 178dcbc0c693fc1d7b9bf3988ec2f3ac5ff3f2f3 (diff) | |
download | subsurface-bd8830672269297f7030670e10f2191ac824093f.tar.gz |
Change prefs.show_units_table to bool
Bool is the correct choice for this option.
int was used before because it was not clear to me how and if I can use
bool in this C file.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'core/subsurface-qt/SettingsObjectWrapper.cpp')
-rw-r--r-- | core/subsurface-qt/SettingsObjectWrapper.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp index 7fc738461..e4a9a71d6 100644 --- a/core/subsurface-qt/SettingsObjectWrapper.cpp +++ b/core/subsurface-qt/SettingsObjectWrapper.cpp @@ -1603,7 +1603,7 @@ int UnitsSettings::durationUnits() const return prefs.units.duration_units; } -int UnitsSettings::showUnitsTable() const +bool UnitsSettings::showUnitsTable() const { return prefs.units.show_units_table; } @@ -1698,7 +1698,7 @@ void UnitsSettings::setDurationUnits(int value) emit durationUnitChanged(value); } -void UnitsSettings::setShowUnitsTable(int value) +void UnitsSettings::setShowUnitsTable(bool value) { if (value == prefs.units.show_units_table) return; @@ -2193,7 +2193,7 @@ void SettingsObjectWrapper::load() } GET_UNIT("vertical_speed_time", vertical_speed_time, units::MINUTES, units::SECONDS); GET_UNIT3("duration_units", duration_units, units::MIXED, units::ALWAYS_HOURS, units::DURATION); - GET_UNIT_INT("show_units_table", show_units_table); + GET_UNIT_BOOL("show_units_table", show_units_table); GET_BOOL("coordinates", coordinates_traditional); s.endGroup(); s.beginGroup("TecDetails"); |