diff --git a/eeschema/libedit_onleftclick.cpp b/eeschema/libedit_onleftclick.cpp index ab8ca15436..b0f8c57309 100644 --- a/eeschema/libedit_onleftclick.cpp +++ b/eeschema/libedit_onleftclick.cpp @@ -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 ); diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 4f63bc3ae3..9200ef1cfa 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -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 );