diff --git a/pcbnew/connectivity/connectivity_items.cpp b/pcbnew/connectivity/connectivity_items.cpp index a39d2adfd6..6d1cd7c0b5 100644 --- a/pcbnew/connectivity/connectivity_items.cpp +++ b/pcbnew/connectivity/connectivity_items.cpp @@ -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(); } diff --git a/pcbnew/connectivity/connectivity_items.h b/pcbnew/connectivity/connectivity_items.h index b8d63db301..8fabdaaa91 100644 --- a/pcbnew/connectivity/connectivity_items.h +++ b/pcbnew/connectivity/connectivity_items.h @@ -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