Fix crash bug when selecting marker.

This commit is contained in:
Jeff Young 2022-04-15 13:40:19 +01:00
parent 847fa7f2c4
commit 110663d214
1 changed files with 16 additions and 8 deletions

View File

@ -399,6 +399,9 @@ void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent )
if( rc_item->GetErrorCode() == DRCE_DIFF_PAIR_UNCOUPLED_LENGTH_TOO_LONG )
{
PCB_TRACK* track = dynamic_cast<PCB_TRACK*>( item );
if( track )
{
int net = track->GetNetCode();
std::vector<BOARD_ITEM*> segs;
@ -412,6 +415,11 @@ void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent )
m_frame->FocusOnItems( segs, principalLayer );
}
else
{
m_frame->FocusOnItem( item, principalLayer );
}
}
else if( m_centerMarkerOnIdle )
{
// we already came from a cross-probe of the marker in the document; don't go