Only sync scenery-path-suffix with valid name
It is possible to have a property tree with /sim/rendering/scenery-path-suffix[n]/enabled=true /sim/rendering/scenery-path-suffix[n]/name=<blank> Previously this would be downloaded as scenery//[tile] Now we just ignore such invalid paths.
This commit is contained in:
parent
e9e2053c64
commit
ceba006c60
@ -1030,14 +1030,14 @@ string_list SGTerraSync::getSceneryPathSuffixes() const
|
||||
string_list scenerySuffixes;
|
||||
|
||||
for (auto node : _renderingRoot->getChildren("scenery-path-suffix")) {
|
||||
if (node->getBoolValue("enabled", true)) {
|
||||
if (node->getBoolValue("enabled", true) && node->hasValue("name")) {
|
||||
scenerySuffixes.push_back(node->getStringValue("name"));
|
||||
}
|
||||
}
|
||||
|
||||
if (scenerySuffixes.empty()) {
|
||||
// if preferences didn't load, use some default
|
||||
scenerySuffixes = {"Objects", "Terrain"}; // defaut values
|
||||
scenerySuffixes = {"Objects", "Terrain"}; // default values
|
||||
}
|
||||
|
||||
return scenerySuffixes;
|
||||
|
Loading…
Reference in New Issue
Block a user