mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
0e408cbadd
commit
0296a456b2
2 changed files with 8 additions and 0 deletions
|
@ -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))
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue