src/Main/globals.cxx: don't load /ai/models/ from autosave.xml file.
This cleans things up if earlier 'next' build as added spurious property items to autosave.
This commit is contained in:
parent
20a9953130
commit
ab7e7ec7b4
1 changed files with 8 additions and 0 deletions
|
@ -808,6 +808,14 @@ FGGlobals::loadUserSettings(SGPath userDataPath)
|
|||
} else {
|
||||
tryAutosaveMigration(userDataPath, &autosave);
|
||||
}
|
||||
/* Before 2020-03-10, we could save portions of the /ai/models/ tree, which
|
||||
confuses things when loaded again. So delete any such items if they have
|
||||
been loaded. */
|
||||
SGPropertyNode* ai = autosave.getNode("ai");
|
||||
if (ai) {
|
||||
SGPropertyNode* ai_models = ai->getNode("models");
|
||||
ai->removeChildren("models");
|
||||
}
|
||||
copyProperties(&autosave, globals->get_props());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue