From 77aa48b825082857d633412870674945477a9573 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 8 Oct 2020 00:27:10 +0100 Subject: [PATCH] Fix COMMIT handler for deleting PCB_GROUPs in footprint editor. --- pcbnew/board_commit.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pcbnew/board_commit.cpp b/pcbnew/board_commit.cpp index 04aa842158..f94988fd4b 100644 --- a/pcbnew/board_commit.cpp +++ b/pcbnew/board_commit.cpp @@ -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