Fix zone cross-probing from DRC dialog.
(cherry picked from commit aa68a3817a
)
This commit is contained in:
parent
b61f6c35c7
commit
ed89827908
|
@ -486,6 +486,8 @@ void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent )
|
||||||
|
|
||||||
if( item->Type() == PCB_ZONE_T )
|
if( item->Type() == PCB_ZONE_T )
|
||||||
{
|
{
|
||||||
|
m_frame->FocusOnItem( item, principalLayer );
|
||||||
|
|
||||||
m_frame->GetBoard()->GetConnectivity()->RunOnUnconnectedEdges(
|
m_frame->GetBoard()->GetConnectivity()->RunOnUnconnectedEdges(
|
||||||
[&]( CN_EDGE& edge )
|
[&]( CN_EDGE& edge )
|
||||||
{
|
{
|
||||||
|
@ -500,10 +502,23 @@ void DIALOG_DRC::OnDRCItemSelected( wxDataViewEvent& aEvent )
|
||||||
if( edge.GetSourceNode()->Parent() == a
|
if( edge.GetSourceNode()->Parent() == a
|
||||||
&& edge.GetTargetNode()->Parent() == b )
|
&& edge.GetTargetNode()->Parent() == b )
|
||||||
{
|
{
|
||||||
if( item == a )
|
VECTOR2I focusPos;
|
||||||
m_frame->FocusOnLocation( edge.GetSourcePos() );
|
|
||||||
|
if( item == a && item == b )
|
||||||
|
{
|
||||||
|
focusPos = ( node->m_Type == RC_TREE_NODE::MAIN_ITEM )
|
||||||
|
? edge.GetSourcePos()
|
||||||
|
: edge.GetTargetPos();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
m_frame->FocusOnLocation( edge.GetTargetPos() );
|
{
|
||||||
|
focusPos = ( item == edge.GetSourceNode()->Parent() )
|
||||||
|
? edge.GetSourcePos()
|
||||||
|
: edge.GetTargetPos();
|
||||||
|
}
|
||||||
|
|
||||||
|
m_frame->FocusOnLocation( focusPos );
|
||||||
|
m_frame->RefreshCanvas();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue