1
0
Fork 0

Bracket threshold.xml loading in a DB transaction.

Should mitigate (but not completely fix, yet) bad map performance when initially zooming out, or panning when zoomed out.
This commit is contained in:
James Turner 2012-11-19 22:24:10 +00:00
parent 82884ab3c6
commit 18da917ddd

View file

@ -391,11 +391,17 @@ void FGAirport::loadSceneryDefinitions() const
return;
}
SGPropertyNode_ptr rootNode = new SGPropertyNode;
readProperties(path.str(), rootNode);
const_cast<FGAirport*>(this)->readThresholdData(rootNode);
cache->stampCacheFile(path);
try {
cache->beginTransaction();
SGPropertyNode_ptr rootNode = new SGPropertyNode;
readProperties(path.str(), rootNode);
const_cast<FGAirport*>(this)->readThresholdData(rootNode);
cache->stampCacheFile(path);
cache->commitTransaction();
} catch (sg_exception& e) {
cache->abortTransaction();
throw e;
}
}
void FGAirport::readThresholdData(SGPropertyNode* aRoot)