Fix old copy/paste error (from 2017, believe it or not).

Fixes https://gitlab.com/kicad/code/kicad/issues/11487
This commit is contained in:
Jeff Young 2022-09-16 11:21:21 +01:00
parent dd1abcbee9
commit d9f75556bd
1 changed files with 2 additions and 2 deletions

View File

@ -2765,7 +2765,7 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
{ {
BOARD_ITEM* item = static_cast<BOARD_ITEM*>( it.first ); BOARD_ITEM* item = static_cast<BOARD_ITEM*>( it.first );
if( !(item->GetLayerSet() & lset ).any() ) if( !( item->GetLayerSet() & lset ).any() )
continue; continue;
if( PCB_TRACK* track = dyn_cast<PCB_TRACK*>( item ) ) if( PCB_TRACK* track = dyn_cast<PCB_TRACK*>( item ) )
@ -2951,7 +2951,7 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent )
{ {
for( ZONE* z : m_board->Zones() ) for( ZONE* z : m_board->Zones() )
{ {
if( z->IsOnLayer( m_frame->GetActiveLayer() ) ) if( z->IsOnLayer( layer ) )
{ {
if( z->HitTestFilledArea( layer, position ) ) if( z->HitTestFilledArea( layer, position ) )
return z->GetNetCode(); return z->GetNetCode();