router: fix layer switch issue when starting a track on via without fixed segments

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9915
This commit is contained in:
Tomasz Wlostowski 2021-12-16 00:54:52 +01:00
parent 20dcf43fdd
commit 57af990066
1 changed files with 3 additions and 0 deletions

View File

@ -1085,6 +1085,9 @@ bool LINE_PLACER::SetLayer( int aLayer )
|| ( m_startItem->OfKind( ITEM::SOLID_T ) && m_startItem->Layers().Overlaps( aLayer ) ) )
{
m_currentLayer = aLayer;
m_p_start = m_currentStart;
m_direction = m_initial_direction;
m_mouseTrailTracer.Clear();
m_head.Line().Clear();
m_tail.Line().Clear();
m_last_head.Line().Clear();