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
This commit is contained in:
Jeff Young 2022-07-24 09:15:53 +01:00
parent 0e07ce9d2e
commit e36491f231
1 changed files with 3 additions and 2 deletions

View File

@ -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;