Fix ignoreMouseEvents getting stuck in drawing tool.

Fixes: lp:1825613
* https://bugs.launchpad.net/kicad/+bug/1825613
This commit is contained in:
Jeff Young 2019-04-22 00:54:03 +01:00
parent 6e8dd598c0
commit 64ba866146
2 changed files with 4 additions and 0 deletions

View File

@ -633,6 +633,8 @@ void SCH_EDIT_FRAME::PrepareMoveItem( SCH_ITEM* aItem )
{ {
wxCHECK_RET( aItem != NULL, wxT( "Cannot move invalid schematic item" ) ); wxCHECK_RET( aItem != NULL, wxT( "Cannot move invalid schematic item" ) );
GetToolManager()->DeactivateTool();
SetRepeatItem( NULL ); SetRepeatItem( NULL );
if( !aItem->IsNew() ) if( !aItem->IsNew() )

View File

@ -310,6 +310,7 @@ int SCH_DRAWING_TOOL::doPlaceComponent( SCH_COMPONENT* aComponent, SCHLIB_FILTER
// Restore cursor after dialog // Restore cursor after dialog
m_frame->GetCanvas()->MoveCursorToCrossHair(); m_frame->GetCanvas()->MoveCursorToCrossHair();
m_frame->GetCanvas()->SetIgnoreMouseEvents( false );
LIB_PART* part = nullptr; LIB_PART* part = nullptr;
@ -584,6 +585,7 @@ int SCH_DRAWING_TOOL::doTwoClickPlace( KICAD_T aType )
// Restore cursor after dialog // Restore cursor after dialog
m_frame->GetCanvas()->MoveCursorToCrossHair(); m_frame->GetCanvas()->MoveCursorToCrossHair();
m_frame->GetCanvas()->SetIgnoreMouseEvents( false );
if( item ) if( item )
{ {