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
This commit is contained in:
Jeff Young 2024-05-15 12:44:18 +01:00
parent 02bc093b55
commit 20b2e11f21
1 changed files with 1 additions and 1 deletions

View File

@ -1765,7 +1765,7 @@ int BOARD_INSPECTION_TOOL::HighlightItem( const TOOL_EVENT& aEvent )
const std::set<int>& netcodes = settings->GetHighlightNetCodes(); const std::set<int>& netcodes = settings->GetHighlightNetCodes();
// Toggle highlight when the same net was picked // Toggle highlight when the same net was picked
if( netcodes.count( net ) ) if( !aUseSelection && netcodes.size() == 1 && netcodes.contains( net ) )
enableHighlight = !settings->IsHighlightEnabled(); enableHighlight = !settings->IsHighlightEnabled();
if( enableHighlight != settings->IsHighlightEnabled() || !netcodes.count( net ) ) if( enableHighlight != settings->IsHighlightEnabled() || !netcodes.count( net ) )