scenery: Only run SGModelData in the topmost model.
It looks like that we loose the nasal script stored in the property tree when this callback is issued multiple times. This should fix http://code.google.com/p/flightgear-bugs/issues/detail?id=714
This commit is contained in:
parent
df2e5bf39f
commit
191675cc79
@ -218,7 +218,9 @@ sgLoad3DModel_internal(const SGPath& path,
|
|||||||
SGSharedPtr<SGPropertyNode> prop_root = options->getPropertyNode();
|
SGSharedPtr<SGPropertyNode> prop_root = options->getPropertyNode();
|
||||||
if (!prop_root.valid())
|
if (!prop_root.valid())
|
||||||
prop_root = new SGPropertyNode;
|
prop_root = new SGPropertyNode;
|
||||||
|
// The model data appear to be only used in the topmost model
|
||||||
osg::ref_ptr<SGModelData> data = options->getModelData();
|
osg::ref_ptr<SGModelData> data = options->getModelData();
|
||||||
|
options->setModelData(0);
|
||||||
|
|
||||||
osg::ref_ptr<osg::Node> model;
|
osg::ref_ptr<osg::Node> model;
|
||||||
osg::ref_ptr<osg::Group> group;
|
osg::ref_ptr<osg::Group> group;
|
||||||
|
Loading…
Reference in New Issue
Block a user