diff --git a/eeschema/onleftclick.cpp b/eeschema/onleftclick.cpp index d1d3daf3a4..c15ee7898b 100644 --- a/eeschema/onleftclick.cpp +++ b/eeschema/onleftclick.cpp @@ -114,13 +114,6 @@ 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: @@ -409,7 +402,7 @@ void SCH_EDIT_FRAME::OnLeftDClick( wxDC* aDC, const wxPoint& aPosition ) item = LocateAndShowItem( aPosition, SCH_COLLECTOR::DoubleClickItems ); } - if( ( item == NULL ) || ( ( item->GetFlags() & ~HIGHLIGHTED ) != 0 ) ) + if( ( item == NULL ) || ( item->GetFlags() != 0 ) ) break; switch( item->Type() ) diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index dfd57c1e45..a66e509586 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -856,10 +856,7 @@ 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( selection.Front() ) ); - } else m_frame->SendMessageToEESCHEMA( nullptr );