From d448ad4eb3698dfb575fb7cedff9fd7619f7aeb8 Mon Sep 17 00:00:00 2001 From: Henning Stahlke Date: Wed, 22 Dec 2021 16:23:51 +0000 Subject: [PATCH] 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. --- simgear/scene/model/SGLight.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/simgear/scene/model/SGLight.cxx b/simgear/scene/model/SGLight.cxx index ba37f863..8d5670c4 100644 --- a/simgear/scene/model/SGLight.cxx +++ b/simgear/scene/model/SGLight.cxx @@ -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);