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
@ -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…
x
Reference in New Issue
Block a user