diff --git a/pcbnew/router/pns_kicad_iface.cpp b/pcbnew/router/pns_kicad_iface.cpp index 3a69890782..a5d838d987 100644 --- a/pcbnew/router/pns_kicad_iface.cpp +++ b/pcbnew/router/pns_kicad_iface.cpp @@ -910,7 +910,7 @@ void PNS_KICAD_IFACE::Commit() } -void PNS_KICAD_IFACE::SetView( KIGFX::VIEW *aView ) +void PNS_KICAD_IFACE::SetView( KIGFX::VIEW* aView ) { wxLogTrace( "PNS", "SetView %p", aView ); diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 6684ae1010..044e70d30a 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -68,7 +68,6 @@ ROUTER::ROUTER() { theRouter = this; - m_state = IDLE; m_mode = PNS_MODE_ROUTE_SINGLE; @@ -94,11 +93,12 @@ ROUTER::~ROUTER() theRouter = nullptr; } -void ROUTER::SyncWorld( ) + +void ROUTER::SyncWorld() { ClearWorld(); - m_world = std::unique_ptr< NODE >( new NODE ); + m_world = std::unique_ptr( new NODE ); m_iface->SyncWorld( m_world.get() ); } @@ -126,11 +126,10 @@ const ITEM_SET ROUTER::QueryHoverItems( const VECTOR2I& aP ) if( m_state == IDLE ) return m_world->HitTest( aP ); else - { return m_placer->CurrentNode()->HitTest( aP ); - } } + bool ROUTER::StartDragging( const VECTOR2I& aP, ITEM* aStartItem ) { if( !aStartItem || aStartItem->OfKind( ITEM::SOLID_T ) ) @@ -152,6 +151,7 @@ bool ROUTER::StartDragging( const VECTOR2I& aP, ITEM* aStartItem ) return true; } + bool ROUTER::StartRouting( const VECTOR2I& aP, ITEM* aStartItem, int aLayer ) { switch( m_mode ) @@ -197,6 +197,7 @@ void ROUTER::DisplayItems( const ITEM_SET& aItems ) m_iface->DisplayItem( item ); } + void ROUTER::Move( const VECTOR2I& aP, ITEM* endItem ) { m_currentEnd = aP; @@ -228,8 +229,7 @@ void ROUTER::moveDragging( const VECTOR2I& aP, ITEM* aEndItem ) } -void ROUTER::markViolations( NODE* aNode, ITEM_SET& aCurrent, - NODE::ITEM_VECTOR& aRemoved ) +void ROUTER::markViolations( NODE* aNode, ITEM_SET& aCurrent, NODE::ITEM_VECTOR& aRemoved ) { for( ITEM* item : aCurrent.Items() ) { @@ -273,7 +273,7 @@ void ROUTER::updateView( NODE* aNode, ITEM_SET& aCurrent ) aNode->GetUpdatedItems( removed, added ); - for ( auto item : added ) + for( auto item : added ) m_iface->DisplayItem( item ); for( auto item : removed ) @@ -281,7 +281,7 @@ void ROUTER::updateView( NODE* aNode, ITEM_SET& aCurrent ) } -void ROUTER::UpdateSizes ( const SIZES_SETTINGS& aSizes ) +void ROUTER::UpdateSizes( const SIZES_SETTINGS& aSizes ) { m_sizes = aSizes; @@ -483,6 +483,7 @@ void ROUTER::SetMode( ROUTER_MODE aMode ) m_mode = aMode; } + void ROUTER::SetInterface( ROUTER_IFACE *aIface ) { m_iface = aIface;