mirror of https://github.com/OpenRCT2/OpenRCT2.git
This commit is contained in:
parent
25eb403c78
commit
85c1ec8fa5
|
@ -363,8 +363,9 @@ static void window_title_editor_mouseup(rct_window* w, rct_widgetindex widgetInd
|
|||
auto handle = TitleSequenceGetParkHandle(_editingTitleSequence, w->selected_list_item);
|
||||
auto stream = (IStream*)handle->Stream;
|
||||
auto hintPath = String::ToStd(handle->HintPath);
|
||||
|
||||
bool isScenario = ParkImporter::ExtensionIsScenario(hintPath);
|
||||
try
|
||||
{
|
||||
auto& objectMgr = OpenRCT2::GetContext()->GetObjectManager();
|
||||
auto parkImporter = std::unique_ptr<IParkImporter>(ParkImporter::Create(hintPath));
|
||||
auto result = parkImporter->LoadFromStream(stream, isScenario);
|
||||
|
@ -379,6 +380,11 @@ static void window_title_editor_mouseup(rct_window* w, rct_widgetindex widgetInd
|
|||
TitleSequenceCloseParkHandle(handle);
|
||||
window_title_editor_open(WINDOW_TITLE_EDITOR_TAB_SAVES);
|
||||
}
|
||||
catch (const std::exception&)
|
||||
{
|
||||
context_show_error(ERROR_TYPE_FILE_LOAD, STR_FILE_CONTAINS_INVALID_DATA);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue