From b888714ed5a2e98d0e2efd70507efcdec101e810 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Sat, 11 Feb 2023 08:40:20 -0500 Subject: [PATCH] Don't discard temporary item being placed if placement is rejected Fixes https://gitlab.com/kicad/code/kicad/-/issues/13697 --- pcbnew/tools/pcb_tool_base.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/tools/pcb_tool_base.cpp b/pcbnew/tools/pcb_tool_base.cpp index d71e61cceb..a7a056245d 100644 --- a/pcbnew/tools/pcb_tool_base.cpp +++ b/pcbnew/tools/pcb_tool_base.cpp @@ -188,6 +188,7 @@ void PCB_TOOL_BASE::doInteractiveItemPlacement( const TOOL_EVENT& aTool, if( !aPlacer->PlaceItem( newBoardItem, commit ) ) { newBoardItem->SetFlags( oldFlags ); + newItem.reset( newBoardItem ); continue; }