We need the other end of the stick when not yet routing.

Fixes: lp:1781424
* https://bugs.launchpad.net/kicad/+bug/1781424
This commit is contained in:
Jeff Young 2018-07-26 23:35:11 +01:00
parent 265c882320
commit 95d3336f63
3 changed files with 6 additions and 3 deletions

View File

@ -248,7 +248,7 @@ bool TOOL_BASE::checkSnap( ITEM *aItem )
return doSnap; return doSnap;
} }
void TOOL_BASE::updateStartItem( TOOL_EVENT& aEvent, bool aIgnorePads ) void TOOL_BASE::updateStartItem( const TOOL_EVENT& aEvent, bool aIgnorePads )
{ {
int tl = getView()->GetTopLayer(); int tl = getView()->GetTopLayer();
VECTOR2I cp = controls()->GetCursorPosition(); VECTOR2I cp = controls()->GetCursorPosition();

View File

@ -57,7 +57,7 @@ protected:
virtual ITEM* pickSingleItem( const VECTOR2I& aWhere, int aNet = -1, int aLayer = -1, virtual ITEM* pickSingleItem( const VECTOR2I& aWhere, int aNet = -1, int aLayer = -1,
bool aIgnorePads = false ); bool aIgnorePads = false );
virtual void highlightNet( bool aEnabled, int aNetcode = -1 ); virtual void highlightNet( bool aEnabled, int aNetcode = -1 );
virtual void updateStartItem( TOOL_EVENT& aEvent, bool aIgnorePads = false ); virtual void updateStartItem( const TOOL_EVENT& aEvent, bool aIgnorePads = false );
virtual void updateEndItem( const TOOL_EVENT& aEvent ); virtual void updateEndItem( const TOOL_EVENT& aEvent );
void deleteTraces( ITEM* aStartItem, bool aWholeTrack ); void deleteTraces( ITEM* aStartItem, bool aWholeTrack );

View File

@ -706,7 +706,10 @@ int ROUTER_TOOL::onViaCommand( const TOOL_EVENT& aEvent )
m_router->UpdateSizes( sizes ); m_router->UpdateSizes( sizes );
m_router->ToggleViaPlacement(); m_router->ToggleViaPlacement();
updateEndItem( aEvent ); if( m_router->RoutingInProgress() )
updateEndItem( aEvent );
else
updateStartItem( aEvent );
m_router->Move( m_endSnapPoint, m_endItem ); // refresh m_router->Move( m_endSnapPoint, m_endItem ); // refresh