diff options
Diffstat (limited to 'profile-widget')
-rw-r--r-- | profile-widget/diveprofileitem.cpp | 7 | ||||
-rw-r--r-- | profile-widget/diveprofileitem.h | 1 |
2 files changed, 8 insertions, 0 deletions
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)) diff --git a/profile-widget/diveprofileitem.h b/profile-widget/diveprofileitem.h index 6e6b47b3a..38c489a28 100644 --- a/profile-widget/diveprofileitem.h +++ b/profile-widget/diveprofileitem.h @@ -196,6 +196,7 @@ class DiveReportedCeiling : public AbstractProfilePolygonItem { Q_OBJECT public: + DiveReportedCeiling(); virtual void modelDataChanged(const QModelIndex &topLeft = QModelIndex(), const QModelIndex &bottomRight = QModelIndex()); virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); }; |