Eeschema: handle disambiguation cancel in library editor right-click
Fixes: lp:1714608 * https://bugs.launchpad.net/kicad/+bug/1714608
This commit is contained in:
parent
8d14751352
commit
1fe91e6252
|
@ -120,8 +120,12 @@ void LIB_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& aPosition )
|
||||||
if( m_drawItem )
|
if( m_drawItem )
|
||||||
deleteItem( DC );
|
deleteItem( DC );
|
||||||
else
|
else
|
||||||
|
{
|
||||||
DisplayCmpDoc();
|
DisplayCmpDoc();
|
||||||
|
|
||||||
|
if( m_canvas->GetAbortRequest() )
|
||||||
|
m_canvas->SetAbortRequest( false );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_LIBEDIT_ANCHOR_ITEM_BUTT:
|
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_drawItem == NULL )
|
||||||
{
|
{
|
||||||
|
if( m_canvas->GetAbortRequest() )
|
||||||
|
m_canvas->SetAbortRequest( false );
|
||||||
|
|
||||||
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
|
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
|
||||||
|
|
||||||
cmd.SetId( ID_LIBEDIT_GET_FRAME_EDIT_PART );
|
cmd.SetId( ID_LIBEDIT_GET_FRAME_EDIT_PART );
|
||||||
|
|
|
@ -1284,6 +1284,7 @@ void LIB_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent )
|
||||||
LIB_ITEM* LIB_EDIT_FRAME::LocateItemUsingCursor( const wxPoint& aPosition,
|
LIB_ITEM* LIB_EDIT_FRAME::LocateItemUsingCursor( const wxPoint& aPosition,
|
||||||
const KICAD_T aFilterList[] )
|
const KICAD_T aFilterList[] )
|
||||||
{
|
{
|
||||||
|
wxPoint pos;
|
||||||
LIB_PART* part = GetCurPart();
|
LIB_PART* part = GetCurPart();
|
||||||
|
|
||||||
if( !part )
|
if( !part )
|
||||||
|
@ -1291,7 +1292,12 @@ LIB_ITEM* LIB_EDIT_FRAME::LocateItemUsingCursor( const wxPoint& aPosition,
|
||||||
|
|
||||||
LIB_ITEM* item = locateItem( aPosition, aFilterList );
|
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 )
|
if( item == NULL && aPosition != pos )
|
||||||
item = locateItem( pos, aFilterList );
|
item = locateItem( pos, aFilterList );
|
||||||
|
|
Loading…
Reference in New Issue