Browse Source

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
pull/18/head
Jeff Young 4 months ago
parent
commit
52f9cba035
  1. 2
      common/eda_item.cpp
  2. 3
      pcbnew/undo_redo.cpp

2
common/eda_item.cpp

@ -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
pcbnew/undo_redo.cpp

@ -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 ) );

Loading…
Cancel
Save