| 191 | } |
| 192 | |
| 193 | void EditorState::command_Clear(const MyGUI::UString& _commandName, bool& _result) |
| 194 | { |
| 195 | if (!checkCommand()) |
| 196 | return; |
| 197 | |
| 198 | if (UndoManager::getInstance().isUnsaved()) |
| 199 | { |
| 200 | MyGUI::Message* message = MessageBoxManager::getInstance().create( |
| 201 | replaceTags("Warning"), |
| 202 | replaceTags("MessageUnsavedData"), |
| 203 | MyGUI::MessageBoxStyle::IconQuest | MyGUI::MessageBoxStyle::Yes | MyGUI::MessageBoxStyle::No | |
| 204 | MyGUI::MessageBoxStyle::Cancel); |
| 205 | message->eventMessageBoxResult += MyGUI::newDelegate(this, &EditorState::notifyMessageBoxResultClear); |
| 206 | } |
| 207 | else |
| 208 | { |
| 209 | clear(); |
| 210 | } |
| 211 | |
| 212 | _result = true; |
| 213 | } |
| 214 | |
| 215 | void EditorState::command_Quit(const MyGUI::UString& _commandName, bool& _result) |
| 216 | { |
nothing calls this directly
no test coverage detected