Add missing member variables to EDA_ITEM::operator=

Also don't rebiuld groups that are only on the undo list.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21064
This commit is contained in:
Jeff Young
2025-06-05 11:58:17 +01:00
parent a04bead8b0
commit 52f9cba035
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -333,7 +333,9 @@ EDA_ITEM& EDA_ITEM::operator=( const EDA_ITEM& aItem )
m_structType = aItem.m_structType;
m_flags = aItem.m_flags;
m_parent = aItem.m_parent;
m_group = aItem.m_group;
m_forceVisible = aItem.m_forceVisible;
m_isRollover = aItem.m_isRollover;
SetForcedTransparency( aItem.GetForcedTransparency() );
+3
View File
@@ -533,6 +533,9 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
{
ITEM_PICKER& wrapper = aList->GetItemWrapper( ii );
if( wrapper.GetStatus() == UNDO_REDO::DELETED )
continue;
BOARD_ITEM* parentGroup = GetBoard()->ResolveItem( wrapper.GetGroupId(), true );
wrapper.GetItem()->SetParentGroup( dynamic_cast<PCB_GROUP*>( parentGroup ) );