pcb search: don't list generators in groups

This commit is contained in:
Mike Williams
2025-05-19 09:10:47 -04:00
parent 8a0d89c45c
commit 22b24bb4df
2 changed files with 4 additions and 1 deletions
-1
View File
@@ -2188,7 +2188,6 @@ int PCB_CONTROL::UpdateMessagePanel( const TOOL_EVENT& aEvent )
if( aItem->Type() == PCB_GROUP_T || aItem->Type() == PCB_GENERATOR_T )
{
// Use dynamic_cast to include PCB_GENERATORs.
static_cast<PCB_GROUP*>( aItem )->RunOnChildren( accumulateArea, RECURSE_MODE::RECURSE );
return;
}
+4
View File
@@ -364,6 +364,10 @@ int GROUP_SEARCH_HANDLER::Search( const wxString& aQuery )
for( BOARD_ITEM* item : board->Groups() )
{
// Skip generators, they are for internal use, not user-facing grouping
if( item->Type() == PCB_GENERATOR_T )
continue;
if( frp.findString.IsEmpty() || item->Matches( frp, nullptr ) )
m_hitlist.push_back( item );
}