From 809f4c2ffb38cc11ed7d018b82a64d523f89e43b Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 7 Oct 2020 18:05:09 +0100 Subject: [PATCH] Finish single-click-place drawing tool on double-click. Fixes https://gitlab.com/kicad/code/kicad/issues/5907 --- eeschema/tools/sch_drawing_tools.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index 77d8feba65..6257abf638 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -504,7 +504,7 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) break; } } - else if( evt->IsClick( BUT_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) ) { if( !m_frame->GetScreen()->GetItem( cursorPos, 0, type ) ) { @@ -523,6 +523,12 @@ int SCH_DRAWING_TOOLS::SingleClickPlace( const TOOL_EVENT& aEvent ) m_frame->OnModify(); } } + + if( evt->IsDblClick( BUT_LEFT ) ) // Finish tool. + { + m_frame->PopTool( tool ); + break; + } } else if( evt->IsClick( BUT_RIGHT ) ) {