Allow deleting text item out of parent footprint in PCB editor.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18425
This commit is contained in:
Jeff Young 2024-07-22 20:21:04 +01:00
parent 7ca84091b6
commit 87ee56b582

View File

@ -2402,11 +2402,25 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut )
fieldsAlreadyHidden++;
}
getView()->Update( board_item );
getView()->Update( parentFP );
break;
}
case PCB_TEXT_T:
if( parentFP )
{
commit.Modify( parentFP );
parentFP->Delete( board_item );
getView()->Update( parentFP );
}
else
{
commit.Remove( board_item );
}
itemsDeleted++;
break;
case PCB_SHAPE_T:
case PCB_TEXTBOX_T:
case PCB_TABLE_T: