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:
parent
265c882320
commit
95d3336f63
|
@ -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();
|
||||||
|
|
|
@ -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 );
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue