Simplify code

This seems like a rather obvious optimization...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-04-14 23:21:09 -07:00
parent e5967dd193
commit f7a327077b

View file

@ -302,11 +302,8 @@ void DiveHeartrateItem::preferencesChanged()
{ {
QSettings s; QSettings s;
s.beginGroup("TecDetails"); s.beginGroup("TecDetails");
setVisible(s.value(visibilityKey).toBool()); visible = s.value(visibilityKey).toBool();
if (s.value(visibilityKey).toBool()) setVisible(visible);
visible = true;
else
visible = false;
} }
void DiveHeartrateItem::setVisibilitySettingsKey(const QString &key) void DiveHeartrateItem::setVisibilitySettingsKey(const QString &key)