Eeschema: handle disambiguation cancel in library editor right-click

Fixes: lp:1714608
* https://bugs.launchpad.net/kicad/+bug/1714608
This commit is contained in:
Seth Hillbrand 2017-09-01 15:50:25 -07:00 committed by Wayne Stambaugh
parent 8d14751352
commit 1fe91e6252
2 changed files with 14 additions and 1 deletions

View File

@ -120,8 +120,12 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
if( m_drawItem )
deleteItem( DC );
else
{
DisplayCmpDoc();
if( m_canvas->GetAbortRequest() )
m_canvas->SetAbortRequest( false );
}
break;
case ID_LIBEDIT_ANCHOR_ITEM_BUTT:
@ -156,6 +160,9 @@ void LIB_EDIT_FRAME::OnLeftDClick( wxDC* DC, const wxPoint& aPosition )
if( m_drawItem == NULL )
{
if( m_canvas->GetAbortRequest() )
m_canvas->SetAbortRequest( false );
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetId( ID_LIBEDIT_GET_FRAME_EDIT_PART );

View File

@ -1284,6 +1284,7 @@ void LIB_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent )
LIB_ITEM* LIB_EDIT_FRAME::LocateItemUsingCursor( const wxPoint& aPosition,
const KICAD_T aFilterList[] )
{
wxPoint pos;
LIB_PART* part = GetCurPart();
if( !part )
@ -1291,7 +1292,12 @@ LIB_ITEM* LIB_EDIT_FRAME::LocateItemUsingCursor( const wxPoint& aPosition,
LIB_ITEM* item = locateItem( aPosition, aFilterList );
wxPoint pos = GetNearestGridPosition( aPosition );
// If the user aborted the clarification context menu, don't show it again at the
// grid position.
if( !item && m_canvas->GetAbortRequest() )
return NULL;
pos = GetNearestGridPosition( aPosition );
if( item == NULL && aPosition != pos )
item = locateItem( pos, aFilterList );