Fix parentage of groups

In the footprint editor, we must parent the group to the module
not the board.

Fixes https://gitlab.com/kicad/code/kicad/issues/6181
This commit is contained in:
Ian McInerney 2020-10-26 23:52:53 +00:00
parent 31e626f279
commit dc542be91d
1 changed files with 6 additions and 1 deletions

View File

@ -990,7 +990,12 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
PCB_GROUP* grp = nullptr;
if( dlg.ShouldGroupItems() )
grp = new PCB_GROUP( m_frame->GetBoard() );
{
if( m_editModules )
grp = new PCB_GROUP( m_frame->GetBoard()->GetFirstModule() );
else
grp = new PCB_GROUP( m_frame->GetBoard() );
}
// Build the undo list & add items to the current view
for( auto& ptr : list)