diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-09-24 12:38:24 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-09-24 12:38:24 -0700 |
commit | 0296a456b299d41887b300d4c59b695be54b1dfa (patch) | |
tree | a18cb635eff567b8be29ae5a08c54834f164b79a | |
parent | 0e408cbadd8efda6c8dba2ec75c9b633748e196b (diff) | |
download | subsurface-0296a456b299d41887b300d4c59b695be54b1dfa.tar.gz |
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 <dirk@hohndel.org>
-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); }; |