| 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 | { |
nothing calls this directly
no test coverage detected