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.
This commit is contained in:
parent
06ac172c27
commit
2196959539
|
@ -135,6 +135,9 @@ bool ROUTER::StartDragging( const VECTOR2I& aP, ITEM* aStartItem, int aDragMode
|
||||||
if( !aStartItem || aStartItem->OfKind( ITEM::SOLID_T ) )
|
if( !aStartItem || aStartItem->OfKind( ITEM::SOLID_T ) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
m_placer.reset( new LINE_PLACER( this ) );
|
||||||
|
m_placer->Start( aP, aStartItem );
|
||||||
|
|
||||||
m_dragger.reset( new DRAGGER( this ) );
|
m_dragger.reset( new DRAGGER( this ) );
|
||||||
m_dragger->SetMode( aDragMode );
|
m_dragger->SetMode( aDragMode );
|
||||||
m_dragger->SetWorld( m_world.get() );
|
m_dragger->SetWorld( m_world.get() );
|
||||||
|
|
Loading…
Reference in New Issue