From 5aa8f9880e29bfa9e5d447ab8e24012df9b559cc Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 4 Nov 2022 17:34:43 +0000 Subject: [PATCH] Honour aQuitOnDraw flag when cancelling a segment. Fixes https://gitlab.com/kicad/code/kicad/issues/12832 --- eeschema/tools/sch_line_wire_bus_tool.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eeschema/tools/sch_line_wire_bus_tool.cpp b/eeschema/tools/sch_line_wire_bus_tool.cpp index 9e0730da32..44c0a2b96c 100644 --- a/eeschema/tools/sch_line_wire_bus_tool.cpp +++ b/eeschema/tools/sch_line_wire_bus_tool.cpp @@ -708,6 +708,12 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const TOOL_EVENT& aTool, int aType, if( segment || m_busUnfold.in_progress ) { cleanup(); + + if( aQuitOnDraw ) + { + m_frame->PopTool( aTool ); + break; + } } else {