diff --git a/include/project/board_project_settings.h b/include/project/board_project_settings.h index 222a9b5e41..3e4247e687 100644 --- a/include/project/board_project_settings.h +++ b/include/project/board_project_settings.h @@ -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 ); } }; diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index a543375fe2..01cf477054 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -46,6 +46,7 @@ using namespace std::placeholders; #include #include #include +#include #include #include #include @@ -2356,6 +2357,12 @@ bool PCB_SELECTION_TOOL::itemPassesFilter( BOARD_ITEM* aItem, bool aMultiSelect } } + if( aItem->Type() == PCB_GENERATOR_T ) + aItem = *( static_cast( 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( aItem );