From 0296a456b299d41887b300d4c59b695be54b1dfa Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 24 Sep 2016 12:38:24 -0700 Subject: Hook up the code to toggle DC reported ceiling visibility This got broken a long time ago it seems and no one ever noticed. Signed-off-by: Dirk Hohndel --- profile-widget/diveprofileitem.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'profile-widget/diveprofileitem.cpp') diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp index 0856111cf..14a06beb5 100644 --- a/profile-widget/diveprofileitem.cpp +++ b/profile-widget/diveprofileitem.cpp @@ -897,6 +897,13 @@ void DiveCalculatedTissue::settingsChanged() DiveCalculatedCeiling::setVisible(prefs.calcalltissues && prefs.calcceiling); } +DiveReportedCeiling::DiveReportedCeiling() +{ + connect(SettingsObjectWrapper::instance()->techDetails, &TechnicalDetailsSettings::dcceilingChanged, this, &DiveReportedCeiling::setVisible); + setVisible(prefs.dcceiling); + settingsChanged(); +} + void DiveReportedCeiling::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) { if (!shouldCalculateStuff(topLeft, bottomRight)) -- cgit v1.2.3-70-g09d2