mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Don't rebuild deleted groups.
Also don't futz with parentGroup in RemoveFromScreen(); let the commit & undo code handle it. Fixes https://gitlab.com/kicad/code/kicad/-/issues/21191
This commit is contained in:
parent
19a6669943
commit
8ff66e073a
@ -513,11 +513,6 @@ void SCH_BASE_FRAME::RemoveFromScreen( EDA_ITEM* aItem, SCH_SCREEN* aScreen )
|
||||
if( screen == GetScreen() )
|
||||
GetCanvas()->GetView()->Remove( aItem );
|
||||
|
||||
EDA_GROUP* parentGroup = aItem->GetParentGroup();
|
||||
|
||||
if( parentGroup && !( parentGroup->AsEdaItem()->GetFlags() & STRUCT_DELETED ) )
|
||||
parentGroup->RemoveItem( aItem );
|
||||
|
||||
if( aItem->Type() != SCH_TABLECELL_T )
|
||||
screen->Remove( (SCH_ITEM*) aItem );
|
||||
|
||||
|
@ -510,6 +510,9 @@ void SCH_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
|
||||
{
|
||||
ITEM_PICKER& wrapper = aList->GetItemWrapper( ii );
|
||||
|
||||
if( wrapper.GetStatus() == UNDO_REDO::DELETED )
|
||||
continue;
|
||||
|
||||
SCH_ITEM* parentGroup = Schematic().ResolveItem( wrapper.GetGroupId(), nullptr, true );
|
||||
wrapper.GetItem()->SetParentGroup( dynamic_cast<SCH_GROUP*>( parentGroup ) );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user