Fix highlighting when initiated via ctrl-click.

Fixes: lp:1796755
* https://bugs.launchpad.net/kicad/+bug/1796755
This commit is contained in:
Jeff Young 2019-05-11 00:13:40 +01:00
parent f8776f72ac
commit 76a915d472
1 changed files with 7 additions and 6 deletions

View File

@ -326,10 +326,11 @@ static VECTOR2D CLEAR;
// TODO(JE) Probably use netcode rather than connection name here eventually // TODO(JE) Probably use netcode rather than connection name here eventually
static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition ) static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition )
{ {
SCH_EDIT_FRAME* editFrame = static_cast<SCH_EDIT_FRAME*>( aToolMgr->GetEditFrame() ); SCH_EDIT_FRAME* editFrame = static_cast<SCH_EDIT_FRAME*>( aToolMgr->GetEditFrame() );
EE_SELECTION_TOOL* selTool = aToolMgr->GetTool<EE_SELECTION_TOOL>(); EE_SELECTION_TOOL* selTool = aToolMgr->GetTool<EE_SELECTION_TOOL>();
wxString netName; SCH_EDITOR_CONTROL* editorControl = aToolMgr->GetTool<SCH_EDITOR_CONTROL>();
bool retVal = true; wxString netName;
bool retVal = true;
if( aPosition != CLEAR ) if( aPosition != CLEAR )
{ {
@ -360,8 +361,8 @@ static bool highlightNet( TOOL_MANAGER* aToolMgr, const VECTOR2D& aPosition )
} }
editFrame->SetSelectedNetName( netName ); editFrame->SetSelectedNetName( netName );
TOOL_EVENT dummy;
aToolMgr->RunAction( EE_ACTIONS::highlightNetSelection, true ); editorControl->HighlightNetSelection( dummy );
return retVal; return retVal;
} }