Error reporting: check custom scenery before FGData
Some people put custom scenery inside FGData, re-order to catch that case.
This commit is contained in:
parent
0a6c4aaf7a
commit
a156c5a14d
1 changed files with 9 additions and 5 deletions
|
@ -434,11 +434,6 @@ auto ErrorReporter::ErrorReporterPrivate::getAggregateForOccurence(const ErrorRe
|
|||
// incorrectly, we attribute the error to the scenery, which is
|
||||
// likely what we want/expect
|
||||
auto path = oc.hasContextKey("terrain-stg") ? oc.getContextValue("terrain-stg") : oc.getContextValue("btg");
|
||||
if (simgear::strutils::starts_with(path, _fgdataPathPrefix)) {
|
||||
return getAggregate(Aggregation::FGData, {});
|
||||
} else if (simgear::strutils::starts_with(path, _terrasyncPathPrefix)) {
|
||||
return getAggregate(Aggregation::TerraSync, {});
|
||||
}
|
||||
|
||||
// custom scenery, find out the prefix
|
||||
for (const auto& sceneryPath : globals->get_fg_scenery()) {
|
||||
|
@ -448,6 +443,15 @@ auto ErrorReporter::ErrorReporterPrivate::getAggregateForOccurence(const ErrorRe
|
|||
}
|
||||
}
|
||||
|
||||
// try generic paths
|
||||
if (simgear::strutils::starts_with(path, _fgdataPathPrefix)) {
|
||||
return getAggregate(Aggregation::FGData, {});
|
||||
} else if (simgear::strutils::starts_with(path, _terrasyncPathPrefix)) {
|
||||
return getAggregate(Aggregation::TerraSync, {});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// shouldn't ever happen
|
||||
return getAggregate(Aggregation::CustomScenery, {});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue