forked from rosebudai/OpenRCT2-Web
Defer temp object Load/Unload to calling side
This commit is contained in:
1 parent
342f10a63c
commit
a4e92770fd
4 files changed
+1
-7
No files matched your search
@@ -243,10 +243,10 @@ namespace OpenRCT2::Ui::Windows
|
||||
return;
|
||||
|
||||
auto& objManager = GetContext()->GetObjectManager();
|
||||
|
||||
if (auto obj = objManager.LoadTempObject(source.textObjectId); obj != nullptr)
|
||||
{
|
||||
auto& scenarioMetaObj = reinterpret_cast<ScenarioMetaObject&>(*obj);
|
||||
scenarioMetaObj.Load();
|
||||
|
||||
ParkPreview preview{};
|
||||
preview.images.push_back(scenarioMetaObj.GetMiniMapImage());
|
||||
|
||||
@@ -173,8 +173,6 @@ public:
|
||||
}
|
||||
|
||||
auto object = _objectRepository.LoadObject(ori);
|
||||
object->Load();
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
|
||||
@@ -276,8 +276,6 @@ namespace OpenRCT2::RCT1
|
||||
auto& textObject = reinterpret_cast<ScenarioMetaObject&>(*obj);
|
||||
name = textObject.GetScenarioName();
|
||||
details = textObject.GetScenarioDetails();
|
||||
|
||||
obj->Unload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -301,8 +301,6 @@ namespace OpenRCT2::RCT2
|
||||
auto& textObject = reinterpret_cast<ScenarioMetaObject&>(*obj);
|
||||
dst->Name = textObject.GetScenarioName();
|
||||
dst->Details = textObject.GetScenarioDetails();
|
||||
|
||||
obj->Unload();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user