Improve SameLogicalPadAs() shorting nets test.
This is required to support 4cd26ab6bc
.
This commit is contained in:
parent
f2fdf0f3df
commit
d428b0e20e
|
@ -774,12 +774,19 @@ bool DRC_TEST_PROVIDER_COPPER_CLEARANCE::testPadAgainstItem( PAD* pad, SHAPE* pa
|
||||||
if( otherPad && pad->SameLogicalPadAs( otherPad ) )
|
if( otherPad && pad->SameLogicalPadAs( otherPad ) )
|
||||||
{
|
{
|
||||||
// If pads are equivalent (ie: from the same footprint with the same pad number)...
|
// If pads are equivalent (ie: from the same footprint with the same pad number)...
|
||||||
// ... and have nets...
|
// ... and have "real" nets...
|
||||||
// then they must be the same net
|
// then they must be the same net
|
||||||
if( pad->GetNetCode() && otherPad->GetNetCode()
|
if( testShorting )
|
||||||
&& pad->GetNetCode() != otherPad->GetNetCode()
|
|
||||||
&& testShorting )
|
|
||||||
{
|
{
|
||||||
|
if( pad->GetNetCode() == 0 || pad->GetNetCode() == otherPad->GetNetCode() )
|
||||||
|
return !m_drcEngine->IsCancelled();
|
||||||
|
|
||||||
|
if( pad->GetShortNetname().StartsWith( wxS( "unconnected-(" ) )
|
||||||
|
&& otherPad->GetShortNetname().StartsWith( wxS( "unconnected-(" ) ) )
|
||||||
|
{
|
||||||
|
return !m_drcEngine->IsCancelled();
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_SHORTING_ITEMS );
|
std::shared_ptr<DRC_ITEM> drce = DRC_ITEM::Create( DRCE_SHORTING_ITEMS );
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue