No requirement to UNGROUP when we're recording entire parent FP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20589
This commit is contained in:
+11
-15
@@ -2495,7 +2495,7 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut )
|
||||
BOARD_ITEM* board_item = static_cast<BOARD_ITEM*>( item );
|
||||
FOOTPRINT* parentFP = board_item->GetParentFootprint();
|
||||
|
||||
if( board_item->GetParentGroup() )
|
||||
if( board_item->GetParentGroup() && !parentFP )
|
||||
commit.Stage( board_item, CHT_UNGROUP );
|
||||
|
||||
switch( item->Type() )
|
||||
@@ -2522,6 +2522,16 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut )
|
||||
}
|
||||
|
||||
case PCB_TEXT_T:
|
||||
case PCB_SHAPE_T:
|
||||
case PCB_TEXTBOX_T:
|
||||
case PCB_TABLE_T:
|
||||
case PCB_REFERENCE_IMAGE_T:
|
||||
case PCB_DIMENSION_T:
|
||||
case PCB_DIM_ALIGNED_T:
|
||||
case PCB_DIM_LEADER_T:
|
||||
case PCB_DIM_CENTER_T:
|
||||
case PCB_DIM_RADIAL_T:
|
||||
case PCB_DIM_ORTHOGONAL_T:
|
||||
if( parentFP )
|
||||
{
|
||||
commit.Modify( parentFP );
|
||||
@@ -2536,20 +2546,6 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut )
|
||||
itemsDeleted++;
|
||||
break;
|
||||
|
||||
case PCB_SHAPE_T:
|
||||
case PCB_TEXTBOX_T:
|
||||
case PCB_TABLE_T:
|
||||
case PCB_REFERENCE_IMAGE_T:
|
||||
case PCB_DIMENSION_T:
|
||||
case PCB_DIM_ALIGNED_T:
|
||||
case PCB_DIM_LEADER_T:
|
||||
case PCB_DIM_CENTER_T:
|
||||
case PCB_DIM_RADIAL_T:
|
||||
case PCB_DIM_ORTHOGONAL_T:
|
||||
commit.Remove( board_item );
|
||||
itemsDeleted++;
|
||||
break;
|
||||
|
||||
case PCB_TABLECELL_T:
|
||||
// Clear contents of table cell
|
||||
commit.Modify( board_item );
|
||||
|
||||
Reference in New Issue
Block a user