Remove group from view when ungrouping.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16197
This commit is contained in:
Jeff Young 2023-11-29 18:17:00 +00:00
parent cb12464865
commit a5454cd7c2
1 changed files with 2 additions and 0 deletions

View File

@ -327,6 +327,8 @@ int GROUP_TOOL::Ungroup( const TOOL_EVENT& aEvent )
else else
board->Remove( group ); board->Remove( group );
canvas()->GetView()->Remove( group );
undoList.PushItem( ITEM_PICKER( nullptr, group, UNDO_REDO::DELETED ) ); undoList.PushItem( ITEM_PICKER( nullptr, group, UNDO_REDO::DELETED ) );
m_frame->SaveCopyInUndoList( undoList, UNDO_REDO::UNGROUP ); m_frame->SaveCopyInUndoList( undoList, UNDO_REDO::UNGROUP );
group->SetSelected(); group->SetSelected();