| 210 | } |
| 211 | |
| 212 | void EditorState::commandFileDrop(const MyGUI::UString& _commandName, bool& _result) |
| 213 | { |
| 214 | if (!checkCommand()) |
| 215 | return; |
| 216 | |
| 217 | mDropFileName = CommandManager::getInstance().getCommandData(); |
| 218 | if (mDropFileName.empty()) |
| 219 | return; |
| 220 | |
| 221 | if (ActionManager::getInstance().getChanges()) |
| 222 | { |
| 223 | MyGUI::Message* message = MessageBoxManager::getInstance().create( |
| 224 | replaceTags("Warning"), |
| 225 | replaceTags("MessageUnsavedData"), |
| 226 | MyGUI::MessageBoxStyle::IconQuest | MyGUI::MessageBoxStyle::Yes | MyGUI::MessageBoxStyle::No | |
| 227 | MyGUI::MessageBoxStyle::Cancel); |
| 228 | message->eventMessageBoxResult += |
| 229 | MyGUI::newDelegate(this, &EditorState::notifyMessageBoxResultLoadDropFile); |
| 230 | } |
| 231 | else |
| 232 | { |
| 233 | clear(); |
| 234 | |
| 235 | loadDropFile(); |
| 236 | } |
| 237 | |
| 238 | _result = true; |
| 239 | } |
| 240 | |
| 241 | void EditorState::notifyMessageBoxResultLoad(MyGUI::Message* _sender, MyGUI::MessageBoxStyle _result) |
| 242 | { |
nothing calls this directly
no test coverage detected