Fix crash bug when selecting marker.
This commit is contained in:
parent
847fa7f2c4
commit
110663d214
|
@ -399,6 +399,9 @@ void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent )
|
||||||
if( rc_item->GetErrorCode() == DRCE_DIFF_PAIR_UNCOUPLED_LENGTH_TOO_LONG )
|
if( rc_item->GetErrorCode() == DRCE_DIFF_PAIR_UNCOUPLED_LENGTH_TOO_LONG )
|
||||||
{
|
{
|
||||||
PCB_TRACK* track = dynamic_cast<PCB_TRACK*>( item );
|
PCB_TRACK* track = dynamic_cast<PCB_TRACK*>( item );
|
||||||
|
|
||||||
|
if( track )
|
||||||
|
{
|
||||||
int net = track->GetNetCode();
|
int net = track->GetNetCode();
|
||||||
std::vector<BOARD_ITEM*> segs;
|
std::vector<BOARD_ITEM*> segs;
|
||||||
|
|
||||||
|
@ -412,6 +415,11 @@ void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent )
|
||||||
|
|
||||||
m_frame->FocusOnItems( segs, principalLayer );
|
m_frame->FocusOnItems( segs, principalLayer );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_frame->FocusOnItem( item, principalLayer );
|
||||||
|
}
|
||||||
|
}
|
||||||
else if( m_centerMarkerOnIdle )
|
else if( m_centerMarkerOnIdle )
|
||||||
{
|
{
|
||||||
// we already came from a cross-probe of the marker in the document; don't go
|
// we already came from a cross-probe of the marker in the document; don't go
|
||||||
|
|
Loading…
Reference in New Issue