From 64ba866146c777fb434f832d1534f87c79bdf70f Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Mon, 22 Apr 2019 00:54:03 +0100 Subject: [PATCH] Fix ignoreMouseEvents getting stuck in drawing tool. Fixes: lp:1825613 * https://bugs.launchpad.net/kicad/+bug/1825613 --- eeschema/schedit.cpp | 2 ++ eeschema/tools/sch_drawing_tool.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index fbd66f9a11..069b950511 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -633,6 +633,8 @@ void SCH_EDIT_FRAME::PrepareMoveItem( SCH_ITEM* aItem ) { wxCHECK_RET( aItem != NULL, wxT( "Cannot move invalid schematic item" ) ); + GetToolManager()->DeactivateTool(); + SetRepeatItem( NULL ); if( !aItem->IsNew() ) diff --git a/eeschema/tools/sch_drawing_tool.cpp b/eeschema/tools/sch_drawing_tool.cpp index 485ce0652c..5a0335d3e4 100644 --- a/eeschema/tools/sch_drawing_tool.cpp +++ b/eeschema/tools/sch_drawing_tool.cpp @@ -310,6 +310,7 @@ int SCH_DRAWING_TOOL::doPlaceComponent( SCH_COMPONENT* aComponent, SCHLIB_FILTER // Restore cursor after dialog m_frame->GetCanvas()->MoveCursorToCrossHair(); + m_frame->GetCanvas()->SetIgnoreMouseEvents( false ); LIB_PART* part = nullptr; @@ -584,6 +585,7 @@ int SCH_DRAWING_TOOL::doTwoClickPlace( KICAD_T aType ) // Restore cursor after dialog m_frame->GetCanvas()->MoveCursorToCrossHair(); + m_frame->GetCanvas()->SetIgnoreMouseEvents( false ); if( item ) {