From f7a327077ba9b93e6f2d696e9bf882f86da750a0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 14 Apr 2014 23:21:09 -0700 Subject: Simplify code This seems like a rather obvious optimization... Signed-off-by: Dirk Hohndel --- qt-ui/profile/diveprofileitem.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'qt-ui') 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) -- cgit v1.2.3-70-g09d2