Undo strategy based on being in a footprint, not footprint editor.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14799
This commit is contained in:
Jeff Young 2023-05-23 17:54:35 +01:00
parent 56853a6209
commit 2ac3f4cc9e
1 changed files with 3 additions and 3 deletions

View File

@ -1801,7 +1801,7 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut )
break;
case PCB_TEXT::TEXT_is_DIVERS:
if( IsFootprintEditor() )
if( parentFP )
{
m_commit->Modify( parentFP );
getView()->Remove( board_item );
@ -1823,7 +1823,7 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut )
case PCB_SHAPE_T:
case PCB_TEXTBOX_T:
case PCB_BITMAP_T:
if( IsFootprintEditor() )
if( parentFP )
{
m_commit->Modify( parentFP );
getView()->Remove( board_item );
@ -1847,7 +1847,7 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut )
break;
case PCB_ZONE_T:
if( IsFootprintEditor() )
if( parentFP )
{
m_commit->Modify( parentFP );
getView()->Remove( board_item );