diff --git a/simgear/scene/model/model.cxx b/simgear/scene/model/model.cxx index 8db5b8e0..e72554f4 100644 --- a/simgear/scene/model/model.cxx +++ b/simgear/scene/model/model.cxx @@ -680,9 +680,6 @@ sgLoad3DModel( const string &fg_root, const string &path, model->setUpdateCallback(new SGSwitchUpdateCallback(sgReadCondition(prop_root, cond))); } - // restore old path list - osgDB::setDataFilePathList(pathList); - if ( load_panel ) { // Load panels vector panel_nodes = props.getChildren("panel"); @@ -710,6 +707,9 @@ sgLoad3DModel( const string &fg_root, const string &path, sim_time_sec, texturepath, ignore_branches); } + // restore old path list + osgDB::setDataFilePathList(pathList); + return alignmainmodel; }