From 0328cae94c4fa7b4dc8dc7091e9ed993bef52f6a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 14 Jan 2023 22:37:30 +0000 Subject: [PATCH] Detach revert footprint copy from parent board. Fixes https://gitlab.com/kicad/code/kicad/issues/13537 --- pcbnew/footprint_edit_frame.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index a2522fa8b5..1996fb2194 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -509,6 +509,7 @@ void FOOTPRINT_EDIT_FRAME::restoreLastFootprint() void FOOTPRINT_EDIT_FRAME::AddFootprintToBoard( FOOTPRINT* aFootprint ) { m_originalFootprintCopy.reset( static_cast( aFootprint->Clone() ) ); + m_originalFootprintCopy->SetParent( nullptr ); m_footprintNameWhenLoaded = aFootprint->GetFPID().GetLibItemName();