MCPcopy Create free account
hub / github.com/MyGUI/mygui / load

Method load

Tools/LayoutEditor/EditorState.cpp:305–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303 }
304
305 void EditorState::load()
306 {
307 if (EditorWidgets::getInstance().load(mFileName))
308 {
309 if (mFileName != mDefaultFileName && !isProjectFile(mFileName))
310 RecentFilesManager::getInstance().addRecentFile(mFileName);
311
312 UndoManager::getInstance().addValue();
313 UndoManager::getInstance().setUnsaved(false);
314 }
315 else
316 {
317 /*MyGUI::Message* message = */ MessageBoxManager::getInstance().create(
318 replaceTags("Error"),
319 replaceTags("MessageFailedLoadFile"),
320 MyGUI::MessageBoxStyle::IconError | MyGUI::MessageBoxStyle::Ok);
321
322 setFileName(mDefaultFileName);
323
324 updateCaption();
325 }
326 }
327
328 bool EditorState::save()
329 {

Callers 5

CodeGeneratorMethod · 0.45
createSceneMethod · 0.45
LoadGuiSettingsMethod · 0.45
initialiseMethod · 0.45

Calls 5

replaceTagsFunction · 0.85
addValueMethod · 0.80
setUnsavedMethod · 0.80
addRecentFileMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected