Paste items into group when group has been "entered".

This commit is contained in:
Jeff Young 2020-09-25 22:15:22 +01:00
parent eb97fe8386
commit 2ae4fecaea
2 changed files with 8 additions and 1 deletions

View File

@ -60,7 +60,8 @@ using namespace std::placeholders;
#include <zone_filler.h>
void EditToolSelectionFilter( GENERAL_COLLECTOR& aCollector, int aFlags, SELECTION_TOOL* selectionTool )
void EditToolSelectionFilter( GENERAL_COLLECTOR& aCollector, int aFlags,
SELECTION_TOOL* selectionTool )
{
// Iterate from the back so we don't have to worry about removals.
for( int i = aCollector.GetCount() - 1; i >= 0; --i )
@ -112,6 +113,7 @@ void EditToolSelectionFilter( GENERAL_COLLECTOR& aCollector, int aFlags, SELECTI
aCollector.Remove( item );
}
}
selectionTool->FilterCollectorForGroups( aCollector );
}

View File

@ -849,6 +849,11 @@ int PCBNEW_CONTROL::placeBoardItems( std::vector<BOARD_ITEM*>& aItems, bool aIsN
{
static_cast<MODULE*>( item )->SetPath( KIID_PATH() );
}
if( selectionTool->GetEnteredGroup() && !item->GetParentGroup() )
{
selectionTool->GetEnteredGroup()->AddItem( item );
}
}
// Add or just select items for the move/place command