diff --git a/src/Instrumentation/HUD/HUD.cxx b/src/Instrumentation/HUD/HUD.cxx index 722523fc7..1f3318144 100644 --- a/src/Instrumentation/HUD/HUD.cxx +++ b/src/Instrumentation/HUD/HUD.cxx @@ -82,6 +82,7 @@ HUD::Input::Input(const SGPropertyNode *n, float factor, float offset, } HUD::HUD() : + SGPropertyChangeListener(true /* recursive */), _currentPath(fgGetNode("/sim/hud/current-path", true)), _currentColor(fgGetNode("/sim/hud/current-color", true)), _visibility(fgGetNode("/sim/hud/visibility[1]", true)), diff --git a/src/Model/modelmgr.cxx b/src/Model/modelmgr.cxx index dee9fbb5d..2b2e35924 100644 --- a/src/Model/modelmgr.cxx +++ b/src/Model/modelmgr.cxx @@ -267,6 +267,11 @@ FGModelMgr::Instance::~Instance () void FGModelMgr::Listener::childAdded(SGPropertyNode * parent, SGPropertyNode * child) { + if (!strcmp(parent->getName(), "models") && !strcmp(child->getName(), "model")) { + child->addChangeListener(this); + return; + } + if (strcmp(parent->getName(), "model") || strcmp(child->getName(), "load")) return;