Pass active layer to StartRouting in length tuner

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7857
This commit is contained in:
Jon Evans 2021-04-04 21:51:10 -04:00
parent e08387ce3d
commit a6c3d74a73
1 changed files with 3 additions and 1 deletions

View File

@ -150,7 +150,9 @@ void LENGTH_TUNER_TOOL::performTuning()
controls()->ForceCursorPosition( false );
controls()->SetAutoPan( true );
if( !m_router->StartRouting( m_startSnapPoint, m_startItem, 0 ) )
int layer = m_startItem ? m_startItem->Layer() : static_cast<int>( frame()->GetActiveLayer() );
if( !m_router->StartRouting( m_startSnapPoint, m_startItem, layer ) )
{
frame()->ShowInfoBarMsg( m_router->FailureReason() );
highlightNet( false );