From 20b2e11f210840ba735c1de86eb890cfd7cd4b4d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 15 May 2024 12:44:18 +0100 Subject: [PATCH] Only toggle net selection when coming from hotkey. (The context menu has separate commands for highlight and clear highlight.) Fixes https://gitlab.com/kicad/code/kicad/-/issues/17709 --- pcbnew/tools/board_inspection_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/tools/board_inspection_tool.cpp b/pcbnew/tools/board_inspection_tool.cpp index 453b9a33c7..78a70a7e0f 100644 --- a/pcbnew/tools/board_inspection_tool.cpp +++ b/pcbnew/tools/board_inspection_tool.cpp @@ -1765,7 +1765,7 @@ int BOARD_INSPECTION_TOOL::HighlightItem( const TOOL_EVENT& aEvent ) const std::set& netcodes = settings->GetHighlightNetCodes(); // Toggle highlight when the same net was picked - if( netcodes.count( net ) ) + if( !aUseSelection && netcodes.size() == 1 && netcodes.contains( net ) ) enableHighlight = !settings->IsHighlightEnabled(); if( enableHighlight != settings->IsHighlightEnabled() || !netcodes.count( net ) )