Improve DRC cross-probing a bit.

This commit is contained in:
Jeff Young 2022-09-14 23:32:41 +01:00
parent 0180bcf90a
commit 12ee8b5d7c
2 changed files with 15 additions and 7 deletions

View File

@ -951,6 +951,7 @@ void EDA_DRAW_FRAME::FocusOnLocation( const VECTOR2I& aPos )
} }
GetCanvas()->GetViewControls()->SetCrossHairCursorPosition( aPos ); GetCanvas()->GetViewControls()->SetCrossHairCursorPosition( aPos );
GetCanvas()->GetViewControls()->ShowCursor( true );
} }

View File

@ -476,18 +476,25 @@ void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent )
std::vector<CN_EDGE> edges; std::vector<CN_EDGE> edges;
m_frame->GetBoard()->GetConnectivity()->GetUnconnectedEdges( 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 ) if( edge.GetSourceNode()->Parent() == a && edge.GetTargetNode()->Parent() == b )
m_frame->FocusOnLocation( edge.GetSourcePos() ); {
else if( item == a )
m_frame->FocusOnLocation( edge.GetTargetPos() ); 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 ) else if( rc_item->GetErrorCode() == DRCE_DIFF_PAIR_UNCOUPLED_LENGTH_TOO_LONG )
{ {