When pulling children out of footprints don't format them wrong.

If we leave a footprint parent pointer then we'll
format as fp_line, fp_arc, etc. instead of gr_line,
gr_arc, etc.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20537
This commit is contained in:
Jeff Young 2025-04-02 13:22:23 +01:00
parent 901ad3064d
commit a0ec7f59c4

View File

@ -417,6 +417,8 @@ void CLIPBOARD_IO::SaveSelection( const PCB_SELECTION& aSelected, bool isFootpri
} }
copy->SetLocked( false ); copy->SetLocked( false );
copy->SetParent( nullptr );
copy->SetParentGroup( nullptr );
// locate the reference point at (0, 0) in the copied items // locate the reference point at (0, 0) in the copied items
copy->Move( -refPoint ); copy->Move( -refPoint );
@ -442,7 +444,6 @@ void CLIPBOARD_IO::SaveSelection( const PCB_SELECTION& aSelected, bool isFootpri
RECURSE_MODE::NO_RECURSE ); RECURSE_MODE::NO_RECURSE );
} }
copy->SetParentGroup( nullptr );
delete copy; delete copy;
} }
} }