pcbnew: Fix dragging snap to items

Snapping while dragging depends on the current net being assigned during
dragging.  This initializes the placer to hold the current net while
performing inline dragging.  The placer is reset along with the dragger
in StopRouting().  This fixes the difference in snap between drag and
create new route.

( cherry-picked from 219695953 )
This commit is contained in:
Seth Hillbrand 2018-09-15 20:18:59 -07:00
parent 2b634004ee
commit 9523b26472
1 changed files with 3 additions and 0 deletions

View File

@ -135,6 +135,9 @@ bool ROUTER::StartDragging( const VECTOR2I& aP, ITEM* aStartItem, int aDragMode
if( !aStartItem || aStartItem->OfKind( ITEM::SOLID_T ) )
return false;
m_placer.reset( new LINE_PLACER( this ) );
m_placer->Start( aP, aStartItem );
m_dragger.reset( new DRAGGER( this ) );
m_dragger->SetMode( aDragMode );
m_dragger->SetWorld( m_world.get() );