Fix orthophotos not being cleaned up on scenery reload

This commit is contained in:
Nathaniel Warner
2020-11-27 12:34:49 -08:00
committed by Scott Giese
parent aab373ac3a
commit ca38d9110c
2 changed files with 6 additions and 0 deletions

View File

@@ -371,6 +371,11 @@ namespace simgear {
}
}
void OrthophotoManager::unregisterAll() {
_orthophotos.clear();
SG_LOG(SG_TERRAIN, SG_INFO, "Unregistered all orthophotos");
}
OrthophotoRef OrthophotoManager::getOrthophoto(const long bucket_idx) {
if (_orthophotos[bucket_idx]) {
return _orthophotos[bucket_idx];

View File

@@ -91,6 +91,7 @@ namespace simgear {
void registerOrthophoto(const long bucket_idx, const OrthophotoRef& orthophoto);
void unregisterOrthophoto(const long bucket_idx);
void unregisterAll();
/**
* Get an orthophoto by bucket index