MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / ShowModal

Method ShowModal

plugins/dm.stimresponse/StimResponseEditor.cpp:50–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50int 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
83void StimResponseEditor::populateWindow()
84{

Callers 1

ShowDialogMethod · 0.45

Calls 3

applyPositionMethod · 0.80
reloadMethod · 0.80
saveToPathMethod · 0.45

Tested by

no test coverage detected