From 5652eaea82de5d3cd1c4e3f29f6c22622b7f8d1a Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Tue, 13 Dec 2022 15:50:59 -0500 Subject: [PATCH] Search Pane: name net 0 as "No Net" with no class Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13148 --- pcbnew/widgets/search_handlers.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pcbnew/widgets/search_handlers.cpp b/pcbnew/widgets/search_handlers.cpp index d28658c7d1..3a04afe2a2 100644 --- a/pcbnew/widgets/search_handlers.cpp +++ b/pcbnew/widgets/search_handlers.cpp @@ -311,6 +311,14 @@ wxString NETS_SEARCH_HANDLER::GetResultCell( int aRow, int aCol ) { NETINFO_ITEM* net = m_hitlist[aRow]; + if( net->GetNetCode() == 0 ) + { + if( aCol == 0 ) + return wxT( "No Net" ); + else if( aCol == 1 ) + return wxT( "" ); + } + if( aCol == 0 ) return UnescapeString( net->GetNetname() ); else if( aCol == 1 )