From a5454cd7c2d2c904fb298132738bdc7cdd94a373 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 29 Nov 2023 18:17:00 +0000 Subject: [PATCH] Remove group from view when ungrouping. Fixes https://gitlab.com/kicad/code/kicad/-/issues/16197 --- pcbnew/tools/group_tool.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pcbnew/tools/group_tool.cpp b/pcbnew/tools/group_tool.cpp index 046cfadfbf..4c9b038f13 100644 --- a/pcbnew/tools/group_tool.cpp +++ b/pcbnew/tools/group_tool.cpp @@ -327,6 +327,8 @@ int GROUP_TOOL::Ungroup( const TOOL_EVENT& aEvent ) else board->Remove( group ); + canvas()->GetView()->Remove( group ); + undoList.PushItem( ITEM_PICKER( nullptr, group, UNDO_REDO::DELETED ) ); m_frame->SaveCopyInUndoList( undoList, UNDO_REDO::UNGROUP ); group->SetSelected();