diff --git a/pcbnew/router/pns_joint.h b/pcbnew/router/pns_joint.h index 9cb674dbf6..1aeec51186 100644 --- a/pcbnew/router/pns_joint.h +++ b/pcbnew/router/pns_joint.h @@ -181,7 +181,7 @@ public: return m_linkedItems; } - PNS_ITEMSET Links() const + PNS_ITEMSET& Links() { return m_linkedItems; } diff --git a/pcbnew/router/pns_node.cpp b/pcbnew/router/pns_node.cpp index 50c84bdb11..7bd42d8989 100644 --- a/pcbnew/router/pns_node.cpp +++ b/pcbnew/router/pns_node.cpp @@ -82,13 +82,14 @@ PNS_NODE::~PNS_NODE() allocNodes.erase( this ); #endif + m_joints.clear(); + for( PNS_INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i ) { if( (*i)->BelongsTo( this ) ) delete *i; } - releaseGarbage(); unlinkParent(); diff --git a/pcbnew/router/router_preview_item.cpp b/pcbnew/router/router_preview_item.cpp index c6fda53fbd..c8969191ce 100644 --- a/pcbnew/router/router_preview_item.cpp +++ b/pcbnew/router/router_preview_item.cpp @@ -274,7 +274,7 @@ void ROUTER_PREVIEW_ITEM::Line( const SHAPE_LINE_CHAIN& aLine, int aWidth, int a m_width = aWidth; m_color = assignColor( aStyle ); m_type = PR_SHAPE; - m_depth = -BaseOverlayDepth; + m_depth = -1024; // TODO gal->GetMinDepth() m_shape = aLine.Clone(); ViewSetVisible( true );