Fix a compatibility issue with wxWidgets 3.1.2 (MSW specific)
This commit is contained in:
parent
8cc3912b6c
commit
9f21d32563
|
@ -358,7 +358,17 @@ void CONTEXT_MENU::onMenuEvent( wxMenuEvent& aEvent )
|
||||||
wxMenu* menu = nullptr;
|
wxMenu* menu = nullptr;
|
||||||
FindItem( m_selected, &menu );
|
FindItem( m_selected, &menu );
|
||||||
|
|
||||||
|
// This conditional compilation is probably not needed.
|
||||||
|
// It will be removed later, for the Kicad V 6.x version.
|
||||||
|
// But in "old" 3.0 version, the "&& menu != this" contition was added to avoid hang
|
||||||
|
// This hang is no longer encountered in wxWidgets 3.0.4 version, and this condition is no longer needed.
|
||||||
|
// And in 3.1.2, we have to remove it, as "menu != this" never happens
|
||||||
|
// ("menu != this" always happens in 3.1.1 and older!).
|
||||||
|
#if wxCHECK_VERSION(3, 1, 2)
|
||||||
|
if( menu )
|
||||||
|
#else
|
||||||
if( menu && menu != this )
|
if( menu && menu != this )
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
CONTEXT_MENU* cxmenu = static_cast<CONTEXT_MENU*>( menu );
|
CONTEXT_MENU* cxmenu = static_cast<CONTEXT_MENU*>( menu );
|
||||||
evt = cxmenu->eventHandler( aEvent );
|
evt = cxmenu->eventHandler( aEvent );
|
||||||
|
|
Loading…
Reference in New Issue