From e36491f231114af8f3afc83510e7bdfb8784a853 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 24 Jul 2022 09:15:53 +0100 Subject: [PATCH] Make EEschema highlight net consistent with PCBNew. In particular, highlight net on an already highlighted net clears highlight. Fixes https://gitlab.com/kicad/code/kicad/issues/11016 --- eeschema/tools/sch_editor_control.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/tools/sch_editor_control.cpp b/eeschema/tools/sch_editor_control.cpp index d6aedc3b65..4664fb8b85 100644 --- a/eeschema/tools/sch_editor_control.cpp +++ b/eeschema/tools/sch_editor_control.cpp @@ -1002,17 +1002,18 @@ static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition ) } } - if( !conn ) + if( !conn || conn == editFrame->GetHighlightedConnection() ) { editFrame->SetStatusText( wxT( "" ) ); editFrame->SendCrossProbeClearHighlight(); + editFrame->SetHighlightedConnection( nullptr ); } else { editFrame->SetCrossProbeConnection( conn ); + editFrame->SetHighlightedConnection( conn ); } - editFrame->SetHighlightedConnection( conn ); editFrame->UpdateNetHighlightStatus(); TOOL_EVENT dummy;