1
0
Fork 0

Fire listeners on metar-properties

Mark these as listener-safe, to reduce Nasal warnings.
This commit is contained in:
James Turner 2020-04-09 16:04:31 +01:00
parent b1395a86ba
commit 54ff853454

View file

@ -184,6 +184,9 @@ MetarProperties::MetarProperties( SGPropertyNode_ptr rootNode ) :
_tiedProperties.Tie("decoded", this, &MetarProperties::get_decoded ); _tiedProperties.Tie("decoded", this, &MetarProperties::get_decoded );
_tiedProperties.Tie("cavok", &_cavok ); _tiedProperties.Tie("cavok", &_cavok );
_tiedProperties.Tie("description", this, &MetarProperties::get_description ); _tiedProperties.Tie("description", this, &MetarProperties::get_description );
// mark proeprties as listener-safe, we invoke valueChanged explicitly
_tiedProperties.setAttribute(SGPropertyNode::LISTENER_SAFE, true);
} }
MetarProperties::~MetarProperties() MetarProperties::~MetarProperties()
@ -422,6 +425,7 @@ void MetarProperties::setMetar( SGSharedPtr<FGMetar> m )
_hour = m->getHour(); _hour = m->getHour();
_minute = m->getMinute(); _minute = m->getMinute();
_cavok = m->getCAVOK(); _cavok = m->getCAVOK();
_tiedProperties.fireValueChanged();
_metarValidNode->setBoolValue(true); _metarValidNode->setBoolValue(true);
_description = m->getDescription(-1); _description = m->getDescription(-1);
} }