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

(cherry picked from commit e36491f231)
This commit is contained in:
Jeff Young 2022-07-24 09:15:53 +01:00
parent efc75047c1
commit 1f3bb83a06
1 changed files with 3 additions and 2 deletions

View File

@ -1020,17 +1020,18 @@ static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition )
}
}
if( !conn )
if( !conn || conn == editFrame->GetHighlightedConnection() )
{
editFrame->SetStatusText( wxEmptyString );
editFrame->SendCrossProbeClearHighlight();
editFrame->SetHighlightedConnection( nullptr );
}
else
{
editFrame->SetCrossProbeConnection( conn );
editFrame->SetHighlightedConnection( conn );
}
editFrame->SetHighlightedConnection( conn );
editFrame->UpdateNetHighlightStatus();
TOOL_EVENT dummy;