diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp index 05f6f33230..8f7820abcf 100644 --- a/common/eda_draw_frame.cpp +++ b/common/eda_draw_frame.cpp @@ -951,6 +951,7 @@ void EDA_DRAW_FRAME::FocusOnLocation( const VECTOR2I& aPos ) } GetCanvas()->GetViewControls()->SetCrossHairCursorPosition( aPos ); + GetCanvas()->GetViewControls()->ShowCursor( true ); } diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index bc09f7c022..4e2b417be9 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -476,18 +476,25 @@ void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent ) std::vector edges; m_frame->GetBoard()->GetConnectivity()->GetUnconnectedEdges( edges ); - for( const CN_EDGE& edge : edges ) + if( item->Type() == PCB_ZONE_T ) { - if( edge.GetSourceNode()->Parent() == a && edge.GetTargetNode()->Parent() == b ) + for( const CN_EDGE& edge : edges ) { - if( item == a ) - m_frame->FocusOnLocation( edge.GetSourcePos() ); - else - m_frame->FocusOnLocation( edge.GetTargetPos() ); + if( edge.GetSourceNode()->Parent() == a && edge.GetTargetNode()->Parent() == b ) + { + if( item == a ) + m_frame->FocusOnLocation( edge.GetSourcePos() ); + else + m_frame->FocusOnLocation( edge.GetTargetPos() ); - break; + break; + } } } + else + { + m_frame->FocusOnItem( item, principalLayer ); + } } else if( rc_item->GetErrorCode() == DRCE_DIFF_PAIR_UNCOUPLED_LENGTH_TOO_LONG ) {