Remove RM_Smart state from router tool

It was never fully implemented and there was no way to switch into this
route mode.
This commit is contained in:
Ian McInerney 2021-12-01 09:52:37 +00:00
parent b35aa302e2
commit 63560ecd7b
3 changed files with 7 additions and 19 deletions

View File

@ -717,21 +717,10 @@ bool DRAGGER::Drag( const VECTOR2I& aP )
{ {
switch( m_currentMode ) switch( m_currentMode )
{ {
case RM_MarkObstacles: case RM_MarkObstacles: ret = dragMarkObstacles( aP ); break;
ret = dragMarkObstacles( aP ); case RM_Shove: ret = dragShove( aP ); break;
break; case RM_Walkaround: ret = dragWalkaround( aP ); break;
default: break;
case RM_Shove:
case RM_Smart:
ret = dragShove( aP );
break;
case RM_Walkaround:
ret = dragWalkaround( aP );
break;
default:
break;
} }
} }

View File

@ -1143,7 +1143,7 @@ bool LINE_PLACER::Start( const VECTOR2I& aP, ITEM* aStartItem )
NODE *n; NODE *n;
if ( Settings().Mode() == PNS::RM_Shove || Settings().Mode() == PNS::RM_Smart ) if ( Settings().Mode() == PNS::RM_Shove )
n = m_shove->CurrentNode(); n = m_shove->CurrentNode();
else else
n = m_currentNode; n = m_currentNode;
@ -1452,7 +1452,7 @@ bool LINE_PLACER::UnfixRoute()
m_shove->RewindSpringbackTo( m_currentNode ); m_shove->RewindSpringbackTo( m_currentNode );
m_shove->UnlockSpringbackNode( 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 = m_shove->CurrentNode();
m_currentNode->KillChildren(); m_currentNode->KillChildren();
@ -1472,7 +1472,7 @@ bool LINE_PLACER::HasPlacedAnything() const
bool LINE_PLACER::CommitPlacement() 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_shove->RewindToLastLockedNode();
m_lastNode = m_shove->CurrentNode(); m_lastNode = m_shove->CurrentNode();

View File

@ -41,7 +41,6 @@ enum PNS_MODE
RM_MarkObstacles = 0, ///< Ignore collisions, mark obstacles RM_MarkObstacles = 0, ///< Ignore collisions, mark obstacles
RM_Shove, ///< Only shove RM_Shove, ///< Only shove
RM_Walkaround, ///< Only walk around RM_Walkaround, ///< Only walk around
RM_Smart ///< Guess what's better, try to make least mess on the PCB
}; };
///< Optimization effort. ///< Optimization effort.