Fix COMMIT handler for deleting PCB_GROUPs in footprint editor.

This commit is contained in:
Jeff Young 2020-10-08 00:27:10 +01:00
parent 7e974e5ccc
commit 77aa48b825
1 changed files with 11 additions and 3 deletions

View File

@ -245,11 +245,19 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry, bool a
}
break;
// Metadata items
case PCB_NETINFO_T:
case PCB_GROUP_T:
if( !( changeFlags & CHT_DONE ) )
board->Remove( boardItem );
{
if( m_editModules )
board->GetFirstModule()->Remove( boardItem );
else
board->Remove( boardItem );
}
break;
// Metadata items
case PCB_NETINFO_T:
board->Remove( boardItem );
break;
default: // other types do not need to (or should not) be handled