| 235 | } |
| 236 | |
| 237 | void EditorState::command_FileDrop(const MyGUI::UString& _commandName, bool& _result) |
| 238 | { |
| 239 | if (!checkCommand()) |
| 240 | return; |
| 241 | |
| 242 | mDropFileName = CommandManager::getInstance().getCommandData(); |
| 243 | if (mDropFileName.empty()) |
| 244 | return; |
| 245 | |
| 246 | if (UndoManager::getInstance().isUnsaved()) |
| 247 | { |
| 248 | MyGUI::Message* message = MessageBoxManager::getInstance().create( |
| 249 | replaceTags("Warning"), |
| 250 | replaceTags("MessageUnsavedData"), |
| 251 | MyGUI::MessageBoxStyle::IconQuest | MyGUI::MessageBoxStyle::Yes | MyGUI::MessageBoxStyle::No | |
| 252 | MyGUI::MessageBoxStyle::Cancel); |
| 253 | message->eventMessageBoxResult += |
| 254 | MyGUI::newDelegate(this, &EditorState::notifyMessageBoxResultLoadDropFile); |
| 255 | } |
| 256 | else |
| 257 | { |
| 258 | clear(); |
| 259 | |
| 260 | loadDropFile(); |
| 261 | } |
| 262 | |
| 263 | _result = true; |
| 264 | } |
| 265 | |
| 266 | void EditorState::command_SaveItemAs(const MyGUI::UString& _commandName, bool& _result) |
| 267 | { |
nothing calls this directly
no test coverage detected