Fix off-by-one error in setting depth

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16421
This commit is contained in:
Jon Evans 2023-12-21 08:31:47 -05:00
parent d155870275
commit c1eef79119
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ void ROUTER_PREVIEW_ITEM::Update( const PNS::ITEM* aItem )
m_layer = m_originLayer;
m_color = getLayerColor( m_originLayer );
m_color.a = 0.8;
m_depth = m_originDepth - ( aItem->Layers().Start() * LayerDepthFactor );
m_depth = m_originDepth - ( ( aItem->Layers().Start() + 1 ) * LayerDepthFactor );
switch( aItem->Kind() )
{