Generators should respond to the selection filter that controls their children.
(Tuning patterns to the track checkbox, stitching patterns to the vias checkbox, etc.) Fixes https://gitlab.com/kicad/code/kicad/-/issues/15905
This commit is contained in:
parent
00fb542146
commit
f5e99338a9
|
@ -51,7 +51,6 @@ struct SELECTION_FILTER_OPTIONS
|
|||
bool zones; ///< Copper zones
|
||||
bool keepouts; ///< Keepout zones
|
||||
bool dimensions; ///< Dimension items
|
||||
bool generators; ///< Generator items
|
||||
bool otherItems; ///< Anything not fitting one of the above categories
|
||||
|
||||
SELECTION_FILTER_OPTIONS()
|
||||
|
@ -66,7 +65,6 @@ struct SELECTION_FILTER_OPTIONS
|
|||
zones = true;
|
||||
keepouts = true;
|
||||
dimensions = true;
|
||||
generators = true;
|
||||
otherItems = true;
|
||||
}
|
||||
|
||||
|
@ -76,7 +74,7 @@ struct SELECTION_FILTER_OPTIONS
|
|||
bool Any()
|
||||
{
|
||||
return ( footprints || text || tracks || vias || pads || graphics || zones
|
||||
|| keepouts || dimensions || generators || otherItems );
|
||||
|| keepouts || dimensions || otherItems );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,7 +83,7 @@ struct SELECTION_FILTER_OPTIONS
|
|||
bool All()
|
||||
{
|
||||
return ( footprints && text && tracks && vias && pads && graphics && zones
|
||||
&& keepouts && dimensions && generators && otherItems );
|
||||
&& keepouts && dimensions && otherItems );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ using namespace std::placeholders;
|
|||
#include <pcb_text.h>
|
||||
#include <pcb_textbox.h>
|
||||
#include <pcb_marker.h>
|
||||
#include <pcb_generator.h>
|
||||
#include <zone.h>
|
||||
#include <collectors.h>
|
||||
#include <dialog_filter_selection.h>
|
||||
|
@ -2356,6 +2357,12 @@ bool PCB_SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem, bool aMultiSelect
|
|||
}
|
||||
}
|
||||
|
||||
if( aItem->Type() == PCB_GENERATOR_T )
|
||||
aItem = *( static_cast<PCB_GENERATOR*>( aItem )->GetItems().begin() );
|
||||
|
||||
if( !aItem )
|
||||
return false;
|
||||
|
||||
switch( aItem->Type() )
|
||||
{
|
||||
case PCB_FOOTPRINT_T:
|
||||
|
@ -2383,12 +2390,6 @@ bool PCB_SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem, bool aMultiSelect
|
|||
|
||||
break;
|
||||
|
||||
case PCB_GENERATOR_T:
|
||||
if( !m_filter.generators )
|
||||
return false;
|
||||
|
||||
break;
|
||||
|
||||
case PCB_ZONE_T:
|
||||
{
|
||||
ZONE* zone = static_cast<ZONE*>( aItem );
|
||||
|
|
Loading…
Reference in New Issue