From 22b24bb4dfa5c6b02ba624a8d4e616dc3a0925cc Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Mon, 19 May 2025 09:10:47 -0400 Subject: [PATCH] pcb search: don't list generators in groups --- pcbnew/tools/pcb_control.cpp | 1 - pcbnew/widgets/search_handlers.cpp | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index 06d1de323a..7b3edabbdf 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -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( aItem )->RunOnChildren( accumulateArea, RECURSE_MODE::RECURSE ); return; } diff --git a/pcbnew/widgets/search_handlers.cpp b/pcbnew/widgets/search_handlers.cpp index 849021ce96..2fb0e97b7c 100644 --- a/pcbnew/widgets/search_handlers.cpp +++ b/pcbnew/widgets/search_handlers.cpp @@ -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 ); }