From ddc95bc7f7b0fb356ac8f7bf9fcf22bb5d099156 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 21 May 2012 13:50:46 -0500 Subject: [PATCH] fix bug added two revisions ago by me --- pcbnew/class_netinfo.h | 2 +- pcbnew/class_netinfo_item.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 3f679ac926..eba5307a7f 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -232,7 +232,7 @@ public: unsigned m_RatsnestEndIdx; // Ending point of ratsnests of this net // (excluded) in this buffer - NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName = NETCLASS::Default, int aNetCode = 0 ); + NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName = wxEmptyString, int aNetCode = 0 ); ~NETINFO_ITEM(); /** diff --git a/pcbnew/class_netinfo_item.cpp b/pcbnew/class_netinfo_item.cpp index 2f6111272f..acf67bf47e 100644 --- a/pcbnew/class_netinfo_item.cpp +++ b/pcbnew/class_netinfo_item.cpp @@ -25,6 +25,10 @@ NETINFO_ITEM::NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName, int aNetCode ) { SetNet( aNetCode ); + + if( aNetName.size() ) + SetNetname( aNetName ); + m_NbNodes = 0; m_NbLink = 0; m_NbNoconn = 0; @@ -33,7 +37,7 @@ NETINFO_ITEM::NETINFO_ITEM( BOARD_ITEM* aParent, const wxString& aNetName, int a // general buffer of ratsnest m_RatsnestEndIdx = 0; // Ending point of ratsnests of this net - m_NetClassName = aNetName; + m_NetClassName = NETCLASS::Default; m_NetClass = 0; }