mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Handle groups in footprints when filtering selection.
This commit is contained in:
parent
a0ec7f59c4
commit
8ff0aafbb8
@ -3737,6 +3737,9 @@ void PCB_SELECTION_TOOL::FilterCollectorForHierarchy( GENERAL_COLLECTOR& aCollec
|
||||
{
|
||||
if( aCollector[j]->GetParent() )
|
||||
aCollector[j]->GetParent()->ClearFlags( CANDIDATE );
|
||||
|
||||
if( aCollector[j]->GetParentFootprint() )
|
||||
aCollector[j]->GetParentFootprint()->ClearFlags( CANDIDATE );
|
||||
}
|
||||
|
||||
if( aMultiselect )
|
||||
@ -3748,11 +3751,11 @@ void PCB_SELECTION_TOOL::FilterCollectorForHierarchy( GENERAL_COLLECTOR& aCollec
|
||||
for( int j = 0; j < aCollector.GetCount(); )
|
||||
{
|
||||
BOARD_ITEM* item = aCollector[j];
|
||||
BOARD_ITEM* parent = item->GetParent();
|
||||
FOOTPRINT* fp = item->GetParentFootprint();
|
||||
BOARD_ITEM* start = item;
|
||||
|
||||
if( !m_isFootprintEditor && parent && parent->Type() == PCB_FOOTPRINT_T )
|
||||
start = parent;
|
||||
if( !m_isFootprintEditor && fp )
|
||||
start = fp;
|
||||
|
||||
// If a group is entered, disallow selections of objects outside the group.
|
||||
if( m_enteredGroup && !PCB_GROUP::WithinScope( item, m_enteredGroup, m_isFootprintEditor ) )
|
||||
@ -3776,7 +3779,7 @@ void PCB_SELECTION_TOOL::FilterCollectorForHierarchy( GENERAL_COLLECTOR& aCollec
|
||||
}
|
||||
|
||||
// Footprints are a bit easier as they can't be nested.
|
||||
if( parent && ( parent->GetFlags() & CANDIDATE ) )
|
||||
if( fp && ( fp->GetFlags() & CANDIDATE ) )
|
||||
{
|
||||
// Remove children of selected items
|
||||
aCollector.Remove( item );
|
||||
|
Loading…
x
Reference in New Issue
Block a user