| 7489 | } |
| 7490 | |
| 7491 | bool CEditor::Load(const char *pFilename, int StorageType) |
| 7492 | { |
| 7493 | const auto &&ErrorHandler = [this](const char *pErrorMessage) { |
| 7494 | ShowFileDialogError("%s", pErrorMessage); |
| 7495 | log_error("editor/load", "%s", pErrorMessage); |
| 7496 | }; |
| 7497 | |
| 7498 | Reset(); |
| 7499 | bool Result = Map()->Load(pFilename, StorageType, std::move(ErrorHandler)); |
| 7500 | if(Result) |
| 7501 | { |
| 7502 | for(CEditorComponent &Component : m_vComponents) |
| 7503 | Component.OnMapLoad(); |
| 7504 | |
| 7505 | log_info("editor/load", "Loaded map '%s'", Map()->m_aFilename); |
| 7506 | } |
| 7507 | return Result; |
| 7508 | } |
| 7509 | |
| 7510 | CEditorHistory &CEditor::ActiveHistory() |
| 7511 | { |
no test coverage detected