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

Method commandFileDrop

Tools/FontEditor/EditorState.cpp:224–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

222 }
223
224 void EditorState::commandFileDrop(const MyGUI::UString& _commandName, bool& _result)
225 {
226 if (!checkCommand())
227 return;
228
229 mDropFileName = CommandManager::getInstance().getCommandData();
230 if (mDropFileName.empty())
231 return;
232
233 if (ActionManager::getInstance().getChanges())
234 {
235 MyGUI::Message* message = MessageBoxManager::getInstance().create(
236 replaceTags("Warning"),
237 replaceTags("MessageUnsavedData"),
238 MyGUI::MessageBoxStyle::IconQuest | MyGUI::MessageBoxStyle::Yes | MyGUI::MessageBoxStyle::No |
239 MyGUI::MessageBoxStyle::Cancel);
240 message->eventMessageBoxResult +=
241 MyGUI::newDelegate(this, &EditorState::notifyMessageBoxResultLoadDropFile);
242 }
243 else
244 {
245 clear();
246
247 loadDropFile();
248 }
249
250 _result = true;
251 }
252
253 void EditorState::notifyMessageBoxResultLoad(MyGUI::Message* _sender, MyGUI::MessageBoxStyle _result)
254 {

Callers

nothing calls this directly

Calls 6

replaceTagsFunction · 0.85
newDelegateFunction · 0.85
clearFunction · 0.85
emptyMethod · 0.45
getChangesMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected