Paste items into group when group has been "entered".
This commit is contained in:
parent
eb97fe8386
commit
2ae4fecaea
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue