Restore parent group pointers on undo.

Fixes https://gitlab.com/kicad/code/kicad/issues/11914
This commit is contained in:
Jeff Young 2022-09-25 21:44:59 +01:00
parent 503385f52e
commit b4701593fb
1 changed files with 10 additions and 0 deletions

View File

@ -475,6 +475,16 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
SwapItemData( item, image );
if( item->Type() == PCB_GROUP_T )
{
PCB_GROUP* group = static_cast<PCB_GROUP*>( item );
group->RunOnChildren( [&]( BOARD_ITEM* child )
{
child->SetParentGroup( group );
} );
}
view->Add( item );
view->Hide( item, false );
connectivity->Add( item );