Highlight eeschema symbol on left click

CHANGED: Highlight eeschema symbol on left click

Closes https://gitlab.com/kicad/code/kicad/-/merge_requests/83
This commit is contained in:
easyw 2020-01-28 16:11:59 +01:00 committed by Ian McInerney
parent 3ce29a3d7e
commit 8b3c0a941c
2 changed files with 11 additions and 1 deletions

View File

@ -114,6 +114,13 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
switch( GetToolId() )
{
case ID_NO_TOOL_SELECTED:
if( !item )
break;
// Clear current highlight and highlight the current item
GetCanvas()->GetView()->HighlightItem( nullptr, nullptr );
GetCanvas()->GetView()->HighlightItem( item, nullptr );
GetCanvas()->Refresh();
break;
case ID_ZOOM_SELECTION:

View File

@ -856,7 +856,10 @@ int PCB_EDITOR_CONTROL::CrossProbePcbToSch( const TOOL_EVENT& aEvent )
const SELECTION& selection = selTool->GetSelection();
if( selection.Size() == 1 )
{
m_frame->SendMessageToEESCHEMA( nullptr ); // cleaning previous selection
m_frame->SendMessageToEESCHEMA( static_cast<BOARD_ITEM*>( selection.Front() ) );
}
else
m_frame->SendMessageToEESCHEMA( nullptr );