aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-14 23:21:09 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-14 23:21:09 -0700
commitf7a327077ba9b93e6f2d696e9bf882f86da750a0 (patch)
treeaf546573ff6ec6b9b7ee0aa86c1463f246bc74b5 /qt-ui
parente5967dd1933f2ba0511087015f60cf7fae22affa (diff)
downloadsubsurface-f7a327077ba9b93e6f2d696e9bf882f86da750a0.tar.gz
Simplify code
This seems like a rather obvious optimization... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/diveprofileitem.cpp7
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)