Pcbnew: fix crash when opening and closing a context menu, and then trying to open a menu from the menu bar.

Was due to the fact the EVT_MENU_CLOSE capture was missing
This commit is contained in:
jean-pierre charras 2019-05-20 10:56:24 +02:00
parent 97ddefd01a
commit c35ec8ae7c
1 changed files with 2 additions and 1 deletions

View File

@ -102,6 +102,7 @@ BEGIN_EVENT_TABLE( EDA_DRAW_FRAME, KIWAY_PLAYER )
EVT_MOUSEWHEEL( EDA_DRAW_FRAME::OnMouseEvent )
EVT_MENU_OPEN( EDA_DRAW_FRAME::OnMenuOpen )
EVT_MENU_CLOSE( EDA_DRAW_FRAME::OnMenuOpen )
EVT_MENU_HIGHLIGHT_ALL( EDA_DRAW_FRAME::OnMenuOpen )
EVT_ACTIVATE( EDA_DRAW_FRAME::OnActivate )
EVT_MENU_RANGE( ID_ZOOM_BEGIN, ID_ZOOM_END, EDA_DRAW_FRAME::OnZoom )
@ -330,7 +331,7 @@ void EDA_DRAW_FRAME::OnMenuOpen( wxMenuEvent& event )
if( currentMenu )
currentMenu->OnMenuEvent( event );
}
else if( event.GetEventType() == wxEVT_MENU_CLOSE )
else // if( event.GetEventType() == wxEVT_MENU_CLOSE )
{
currentMenu = nullptr;
}