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:
parent
56853a6209
commit
2ac3f4cc9e
|
@ -1801,7 +1801,7 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCB_TEXT::TEXT_is_DIVERS:
|
case PCB_TEXT::TEXT_is_DIVERS:
|
||||||
if( IsFootprintEditor() )
|
if( parentFP )
|
||||||
{
|
{
|
||||||
m_commit->Modify( parentFP );
|
m_commit->Modify( parentFP );
|
||||||
getView()->Remove( board_item );
|
getView()->Remove( board_item );
|
||||||
|
@ -1823,7 +1823,7 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut )
|
||||||
case PCB_SHAPE_T:
|
case PCB_SHAPE_T:
|
||||||
case PCB_TEXTBOX_T:
|
case PCB_TEXTBOX_T:
|
||||||
case PCB_BITMAP_T:
|
case PCB_BITMAP_T:
|
||||||
if( IsFootprintEditor() )
|
if( parentFP )
|
||||||
{
|
{
|
||||||
m_commit->Modify( parentFP );
|
m_commit->Modify( parentFP );
|
||||||
getView()->Remove( board_item );
|
getView()->Remove( board_item );
|
||||||
|
@ -1847,7 +1847,7 @@ void EDIT_TOOL::DeleteItems( const PCB_SELECTION& aItems, bool aIsCut )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PCB_ZONE_T:
|
case PCB_ZONE_T:
|
||||||
if( IsFootprintEditor() )
|
if( parentFP )
|
||||||
{
|
{
|
||||||
m_commit->Modify( parentFP );
|
m_commit->Modify( parentFP );
|
||||||
getView()->Remove( board_item );
|
getView()->Remove( board_item );
|
||||||
|
|
Loading…
Reference in New Issue