Static command target
| 187 | |
| 188 | // Static command target |
| 189 | void StimResponseEditor::ShowDialog() |
| 190 | { |
| 191 | const SelectionInfo& info = GlobalSelectionSystem().getSelectionInfo(); |
| 192 | |
| 193 | if (info.entityCount == 1 && info.totalCount == 1) |
| 194 | { |
| 195 | // Construct a new instance, this enters the main loop |
| 196 | StimResponseEditor* editor = new StimResponseEditor; |
| 197 | |
| 198 | editor->ShowModal(); |
| 199 | editor->Destroy(); |
| 200 | } |
| 201 | else |
| 202 | { |
| 203 | // Exactly one entity must be selected. |
| 204 | wxutil::Messagebox::ShowError(_(NO_ENTITY_ERROR)); |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | int StimResponseEditor::_lastShownPage = -1; |
| 209 |