PNS: Keep most recent good placement around for a rainy day
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8562
This commit is contained in:
parent
e42f4a8f70
commit
6789dac20b
|
@ -960,8 +960,19 @@ void LINE_PLACER::routeStep( const VECTOR2I& aP )
|
|||
|
||||
if( fail )
|
||||
{
|
||||
m_head.RemoveVia();
|
||||
m_head.Clear();
|
||||
if( m_last_head.PointCount() > 0 )
|
||||
{
|
||||
m_head = m_last_head;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_head.RemoveVia();
|
||||
m_head.Clear();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_last_head = m_head;
|
||||
}
|
||||
|
||||
if( !fail && Settings().FollowMouse() )
|
||||
|
|
|
@ -328,6 +328,8 @@ private:
|
|||
LINE m_head; ///< the volatile part of the track from the previously
|
||||
///< analyzed point to the current routing destination
|
||||
|
||||
LINE m_last_head; ///< Most recent successful (non-colliding) head
|
||||
|
||||
LINE m_tail; ///< routing "tail": part of the track that has been already
|
||||
///< fixed due to collisions with obstacles
|
||||
|
||||
|
|
Loading…
Reference in New Issue