router: Do not use reference to a temporary object. Prevent double freeing (m_joints). Draw tuned track always on top.
This commit is contained in:
parent
6989af7904
commit
e342744a32
|
@ -181,7 +181,7 @@ public:
|
||||||
return m_linkedItems;
|
return m_linkedItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
PNS_ITEMSET Links() const
|
PNS_ITEMSET& Links()
|
||||||
{
|
{
|
||||||
return m_linkedItems;
|
return m_linkedItems;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,13 +82,14 @@ PNS_NODE::~PNS_NODE()
|
||||||
allocNodes.erase( this );
|
allocNodes.erase( this );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
m_joints.clear();
|
||||||
|
|
||||||
for( PNS_INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i )
|
for( PNS_INDEX::ITEM_SET::iterator i = m_index->begin(); i != m_index->end(); ++i )
|
||||||
{
|
{
|
||||||
if( (*i)->BelongsTo( this ) )
|
if( (*i)->BelongsTo( this ) )
|
||||||
delete *i;
|
delete *i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
releaseGarbage();
|
releaseGarbage();
|
||||||
unlinkParent();
|
unlinkParent();
|
||||||
|
|
||||||
|
|
|
@ -274,7 +274,7 @@ void ROUTER_PREVIEW_ITEM::Line( const SHAPE_LINE_CHAIN& aLine, int aWidth, int a
|
||||||
m_width = aWidth;
|
m_width = aWidth;
|
||||||
m_color = assignColor( aStyle );
|
m_color = assignColor( aStyle );
|
||||||
m_type = PR_SHAPE;
|
m_type = PR_SHAPE;
|
||||||
m_depth = -BaseOverlayDepth;
|
m_depth = -1024; // TODO gal->GetMinDepth()
|
||||||
m_shape = aLine.Clone();
|
m_shape = aLine.Clone();
|
||||||
|
|
||||||
ViewSetVisible( true );
|
ViewSetVisible( true );
|
||||||
|
|
Loading…
Reference in New Issue