pcbnew: Prevent no-connects from driving clusters
The no-connect net (0) should never drive the net of a cluster. Otherwise, tracks connecting between unconnected pads and connected pads can acquire net 0 incorrectly.
This commit is contained in:
parent
68451a2a9c
commit
6f7475dcd3
|
@ -330,7 +330,10 @@ void CN_CLUSTER::Add( CN_ITEM* item )
|
|||
{
|
||||
m_items.push_back( item );
|
||||
|
||||
if( m_originNet < 0 )
|
||||
if( item->Net() <= 0 )
|
||||
return;
|
||||
|
||||
if( m_originNet <= 0 )
|
||||
{
|
||||
m_originNet = item->Net();
|
||||
}
|
||||
|
|
|
@ -482,7 +482,7 @@ public:
|
|||
|
||||
bool HasValidNet() const
|
||||
{
|
||||
return m_originNet >= 0;
|
||||
return m_originNet > 0;
|
||||
}
|
||||
|
||||
int OriginNet() const
|
||||
|
@ -503,7 +503,7 @@ public:
|
|||
|
||||
bool HasNet() const
|
||||
{
|
||||
return m_originNet >= 0;
|
||||
return m_originNet > 0;
|
||||
}
|
||||
|
||||
bool IsOrphaned() const
|
||||
|
|
Loading…
Reference in New Issue