Fix for context menu hanging up in GAL.
This commit is contained in:
parent
b688f9bc20
commit
dd1fcd0588
|
@ -493,7 +493,7 @@ bool TOOL_MANAGER::ProcessEvent( TOOL_EVENT& aEvent )
|
|||
// If nothing was chosen from the context menu, we must notify the tool as well
|
||||
if( menu->GetSelected() < 0 )
|
||||
{
|
||||
TOOL_EVENT evt( TC_COMMAND, TA_CONTEXT_MENU_CHOICE );
|
||||
TOOL_EVENT evt( TC_COMMAND, TA_CONTEXT_MENU_CHOICE, -1 );
|
||||
dispatchInternal( evt );
|
||||
}
|
||||
|
||||
|
@ -518,10 +518,6 @@ void TOOL_MANAGER::ScheduleContextMenu( TOOL_BASE* aTool, CONTEXT_MENU* aMenu,
|
|||
|
||||
st->contextMenu = aMenu;
|
||||
st->contextMenuTrigger = aTrigger;
|
||||
|
||||
// the tool wants the menu immediately? Preempt it and do so :)
|
||||
if( aTrigger == CMENU_NOW )
|
||||
st->cofunc->Yield();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ protected:
|
|||
m_customHandler = aHandler;
|
||||
}
|
||||
|
||||
virtual OPT_TOOL_EVENT handleCustomEvent(const wxEvent& aEvent )
|
||||
virtual OPT_TOOL_EVENT handleCustomEvent( const wxEvent& aEvent )
|
||||
{
|
||||
return OPT_TOOL_EVENT();
|
||||
}
|
||||
|
|
|
@ -451,12 +451,10 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector )
|
|||
{
|
||||
brightBox.reset( new BRIGHT_BOX( current ) );
|
||||
getView()->Add( brightBox.get() );
|
||||
// BRIGHT_BOX is removed from view on destruction
|
||||
}
|
||||
}
|
||||
|
||||
// Removes possible brighten mark
|
||||
getView()->MarkTargetDirty( KIGFX::TARGET_OVERLAY );
|
||||
|
||||
return current;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue