ROUTER_TOOL needs to handle pads not handled by router itself.

Fixes https://gitlab.com/kicad/code/kicad/issues/9839
This commit is contained in:
Jeff Young 2021-12-01 22:23:47 +00:00
parent 0d3e8e3d09
commit a596a1f2e2
1 changed files with 21 additions and 0 deletions

View File

@ -1836,6 +1836,24 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
view()->Hide( drawing, true );
}
for( PAD* pad : footprint->Pads() )
{
if( ( pad->GetLayerSet() & LSET::AllCuMask() ).none()
&& pad->GetDrillSize().x == 0 )
{
previewItem = static_cast<BOARD_ITEM*>( pad->Clone() );
previewItem->Move( offset );
view()->AddToPreview( previewItem );
}
else
{
// Pads with copper or holes are handled by the router
}
view()->Hide( pad, true );
}
previewItem = static_cast<BOARD_ITEM*>( footprint->Reference().Clone() );
previewItem->Move( offset );
view()->AddToPreview( previewItem );
@ -1900,6 +1918,9 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
for( ZONE* zone : footprint->Zones() )
view()->Hide( zone, false );
for( PAD* pad : footprint->Pads() )
view()->Hide( pad, false );
view()->ClearPreview();
view()->ShowPreview( false );