| 48 | } |
| 49 | |
| 50 | int StimResponseEditor::ShowModal() |
| 51 | { |
| 52 | // Restore the position |
| 53 | _windowPosition.applyPosition(); |
| 54 | |
| 55 | // Reload all the stim types, the map might have changed |
| 56 | _stimTypes.reload(); |
| 57 | |
| 58 | // Scan the selection for entities |
| 59 | rescanSelection(); |
| 60 | |
| 61 | // Has the rescan found an entity (the pointer is non-NULL then) |
| 62 | if (_entity != NULL) |
| 63 | { |
| 64 | // Show the last shown page |
| 65 | _notebook->SetSelection(_lastShownPage); |
| 66 | } |
| 67 | |
| 68 | int returnCode = DialogBase::ShowModal(); |
| 69 | |
| 70 | if (returnCode == wxID_OK) |
| 71 | { |
| 72 | save(); |
| 73 | } |
| 74 | |
| 75 | _lastShownPage = _notebook->GetSelection(); |
| 76 | |
| 77 | // Tell the position tracker to save the information |
| 78 | _windowPosition.saveToPath(RKEY_WINDOW_STATE); |
| 79 | |
| 80 | return returnCode; |
| 81 | } |
| 82 | |
| 83 | void StimResponseEditor::populateWindow() |
| 84 | { |
no test coverage detected