From 63560ecd7b7f5ba962ee7bdf64e1032ab335d0eb Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Wed, 1 Dec 2021 09:52:37 +0000 Subject: [PATCH] Remove RM_Smart state from router tool It was never fully implemented and there was no way to switch into this route mode. --- pcbnew/router/pns_dragger.cpp | 19 ++++--------------- pcbnew/router/pns_line_placer.cpp | 6 +++--- pcbnew/router/pns_routing_settings.h | 1 - 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/pcbnew/router/pns_dragger.cpp b/pcbnew/router/pns_dragger.cpp index 4bd5b87bf5..e7a4f8ea22 100644 --- a/pcbnew/router/pns_dragger.cpp +++ b/pcbnew/router/pns_dragger.cpp @@ -717,21 +717,10 @@ bool DRAGGER::Drag( const VECTOR2I& aP ) { switch( m_currentMode ) { - case RM_MarkObstacles: - ret = dragMarkObstacles( aP ); - break; - - case RM_Shove: - case RM_Smart: - ret = dragShove( aP ); - break; - - case RM_Walkaround: - ret = dragWalkaround( aP ); - break; - - default: - break; + case RM_MarkObstacles: ret = dragMarkObstacles( aP ); break; + case RM_Shove: ret = dragShove( aP ); break; + case RM_Walkaround: ret = dragWalkaround( aP ); break; + default: break; } } diff --git a/pcbnew/router/pns_line_placer.cpp b/pcbnew/router/pns_line_placer.cpp index 05b4060fa3..b099914d70 100644 --- a/pcbnew/router/pns_line_placer.cpp +++ b/pcbnew/router/pns_line_placer.cpp @@ -1143,7 +1143,7 @@ bool LINE_PLACER::Start( const VECTOR2I& aP, ITEM* aStartItem ) NODE *n; - if ( Settings().Mode() == PNS::RM_Shove || Settings().Mode() == PNS::RM_Smart ) + if ( Settings().Mode() == PNS::RM_Shove ) n = m_shove->CurrentNode(); else n = m_currentNode; @@ -1452,7 +1452,7 @@ bool LINE_PLACER::UnfixRoute() m_shove->RewindSpringbackTo( m_currentNode ); m_shove->UnlockSpringbackNode( m_currentNode ); - if( Settings().Mode() == PNS::RM_Shove || Settings().Mode() == PNS::RM_Smart ) + if( Settings().Mode() == PNS::RM_Shove ) { m_currentNode = m_shove->CurrentNode(); m_currentNode->KillChildren(); @@ -1472,7 +1472,7 @@ bool LINE_PLACER::HasPlacedAnything() const bool LINE_PLACER::CommitPlacement() { - if( Settings().Mode() == PNS::RM_Shove || Settings().Mode() == PNS::RM_Smart ) + if( Settings().Mode() == PNS::RM_Shove ) { m_shove->RewindToLastLockedNode(); m_lastNode = m_shove->CurrentNode(); diff --git a/pcbnew/router/pns_routing_settings.h b/pcbnew/router/pns_routing_settings.h index 60226db6d7..fb2158674f 100644 --- a/pcbnew/router/pns_routing_settings.h +++ b/pcbnew/router/pns_routing_settings.h @@ -41,7 +41,6 @@ enum PNS_MODE RM_MarkObstacles = 0, ///< Ignore collisions, mark obstacles RM_Shove, ///< Only shove RM_Walkaround, ///< Only walk around - RM_Smart ///< Guess what's better, try to make least mess on the PCB }; ///< Optimization effort.