Fix copy/paste of groups.

We can't check for selected on parent groups because the order isn't
defined (and the parent may not yet have been selected).  Check for
inclusion instead.
This commit is contained in:
Jeff Young 2020-09-26 12:40:48 +01:00
parent d7e80f8008
commit 035abe960c
1 changed files with 1 additions and 1 deletions

View File

@ -872,7 +872,7 @@ int PCBNEW_CONTROL::placeBoardItems( std::vector<BOARD_ITEM*>& aItems, bool aIsN
// object.
item->SetSelected();
if( !item->GetParentGroup() || !item->GetParentGroup()->IsSelected() )
if( !item->GetParentGroup() || !std::contains( aItems, item->GetParentGroup() ) )
selection.Add( item );
}