Don't discard temporary item being placed if placement is rejected

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13697
This commit is contained in:
Jon Evans 2023-02-11 08:40:20 -05:00
parent 822d7af4b7
commit b888714ed5
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}