From 3bdd69ad6bc6d3a7243bf6371137b82c1723d490 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 12 Apr 2019 19:51:18 -0700 Subject: [PATCH] eeschema: Fix undo stacking for break wire The break wire command is actually two commands: modify the existing wire and add a new wire. This means that the command must append to the previous commit to avoid breaking the undo stack Fixes: lp:1824251 * https://bugs.launchpad.net/kicad/+bug/1824251 --- eeschema/bus-wire-junction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index 3e0a4275dc..7bdfa2daad 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -776,8 +776,8 @@ bool SCH_EDIT_FRAME::BreakSegment( SCH_LINE* aSegment, const wxPoint& aPoint, newSegment->SetStartPoint( aPoint ); AddToScreen( newSegment, aScreen ); - if( aAppend ) - SaveCopyInUndoList( newSegment, UR_NEW, true ); + SaveCopyInUndoList( newSegment, UR_NEW, aAppend ); + SaveCopyInUndoList( aSegment, UR_CHANGED, true ); RefreshItem( aSegment ); aSegment->SetEndPoint( aPoint );