From 09bae9bb1479091ffc57756985a32b20cea66ed7 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 12 Dec 2023 16:06:44 +0000 Subject: [PATCH] Fallback to normal undo when wire-drawing not in progress. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16216 (cherry picked from commit 035725cd5d0ba184c3ca439cf802d21f1056de37) --- eeschema/tools/sch_line_wire_bus_tool.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eeschema/tools/sch_line_wire_bus_tool.cpp b/eeschema/tools/sch_line_wire_bus_tool.cpp index b6e0762a94..4dc9fc17d9 100644 --- a/eeschema/tools/sch_line_wire_bus_tool.cpp +++ b/eeschema/tools/sch_line_wire_bus_tool.cpp @@ -937,6 +937,11 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const TOOL_EVENT& aTool, int aType, m_view->AddToPreview( wire->Clone() ); } } + else if( evt->IsAction( &ACTIONS::undo ) ) + { + // Dispatch as normal undo event + evt->SetPassEvent(); + } else { wxBell();