Add 'insert symbol menu' in EVT_MENU_OPEN instead of updateUI, this fixes crash on wxGTK

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1647 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2011-02-02 23:16:59 +00:00
parent b96e7ad1fb
commit e36f697855
5 changed files with 32 additions and 1 deletions
+6
View File
@@ -813,6 +813,11 @@ void SetWindow::onChildMenu(wxCommandEvent& ev) {
current_panel->onCommand(ev.GetId());
}
void SetWindow::onMenuOpen(wxMenuEvent& ev) {
wxFrame::OnMenuOpen(ev);
current_panel->onMenuOpen(ev);
}
void SetWindow::onIdle(wxIdleEvent& ev) {
// Stuff that must be done in the main thread
show_update_dialog(this);
@@ -856,6 +861,7 @@ BEGIN_EVENT_TABLE(SetWindow, wxFrame)
EVT_MENU (ID_HELP_INDEX, SetWindow::onHelpIndex)
EVT_MENU (ID_HELP_WEBSITE, SetWindow::onHelpWebsite)
EVT_MENU (ID_HELP_ABOUT, SetWindow::onHelpAbout)
EVT_MENU_OPEN ( SetWindow::onMenuOpen)
EVT_TOOL_RANGE (ID_CHILD_MIN, ID_CHILD_MAX, SetWindow::onChildMenu)
EVT_COMMAND_RANGE (ID_CHILD_MIN, ID_CHILD_MAX, wxEVT_COMMAND_BUTTON_CLICKED, SetWindow::onChildMenu)
EVT_COMMAND_RANGE (ID_CHILD_MIN, ID_CHILD_MAX, wxEVT_COMMAND_SPINCTRL_UPDATED, SetWindow::onChildMenu)