diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-04-14 23:21:09 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-14 23:21:09 -0700 |
commit | f7a327077ba9b93e6f2d696e9bf882f86da750a0 (patch) | |
tree | af546573ff6ec6b9b7ee0aa86c1463f246bc74b5 | |
parent | e5967dd1933f2ba0511087015f60cf7fae22affa (diff) | |
download | subsurface-f7a327077ba9b93e6f2d696e9bf882f86da750a0.tar.gz |
Simplify code
This seems like a rather obvious optimization...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/profile/diveprofileitem.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index 52cf3d91b..6490c9b7a 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -302,11 +302,8 @@ void DiveHeartrateItem::preferencesChanged() { QSettings s; s.beginGroup("TecDetails"); - setVisible(s.value(visibilityKey).toBool()); - if (s.value(visibilityKey).toBool()) - visible = true; - else - visible = false; + visible = s.value(visibilityKey).toBool(); + setVisible(visible); } void DiveHeartrateItem::setVisibilitySettingsKey(const QString &key) |