simgear/scene/model/SGLight.cxx: listen to entire /scenery/lights subtree.

Set VALUE_CHANGED_DOWN attribute on /scenery/lights so that listeners see
changes to all nodes in subtree.
This commit is contained in:
Henning Stahlke 2021-12-22 16:23:51 +00:00 committed by Julian Smith
parent 9a9b1a8db4
commit d448ad4eb3

View File

@ -117,8 +117,9 @@ SGLight::appendLight(const SGPropertyNode* configNode,
//-- copy config to prop tree --
const std::string propPath {"/scenery/lights"};
const std::string propName {"light"};
SGPropertyNode_ptr _pConfig = simgear::getPropertyRoot()->getNode(propPath, true)
->addChild(propName);
SGPropertyNode_ptr _pConfig = simgear::getPropertyRoot()->getNode(propPath, true);
_pConfig->setAttribute(SGPropertyNode::VALUE_CHANGED_DOWN, true);
_pConfig = _pConfig->addChild(propName);
copyProperties(configNode, _pConfig);