Clear flags on duplicate, save as, etc.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/23138
This commit is contained in:
Jeff Young
2026-02-24 12:13:25 +00:00
parent f74dec6889
commit 85ea10e59a
+8
View File
@@ -820,6 +820,14 @@ bool FOOTPRINT_EDIT_FRAME::SaveFootprintInLibrary( FOOTPRINT* aFootprint,
{
aFootprint->SetFPID( LIB_ID( wxEmptyString, aFootprint->GetFPID().GetLibItemName() ) );
// Clear selected, brightened, temp flags, edit flags, the whole shebang.
aFootprint->RunOnChildren(
[]( BOARD_ITEM* child )
{
child->ClearFlags();
},
RECURSE_MODE::RECURSE );
FOOTPRINT_LIBRARY_ADAPTER* adapter = PROJECT_PCB::FootprintLibAdapter( &Prj() );
adapter->SaveFootprint( aLibraryName, aFootprint );