Don't use drag origin for real drag events.
Fixes https://gitlab.com/kicad/code/kicad/issues/12763
This commit is contained in:
parent
4066850f37
commit
63f937db85
|
@ -318,12 +318,15 @@ void TOOL_BASE::updateEndItem( const TOOL_EVENT& aEvent )
|
|||
|
||||
controls()->ForceCursorPosition( false );
|
||||
|
||||
VECTOR2I mousePos;
|
||||
VECTOR2I mousePos = controls()->GetMousePosition();
|
||||
|
||||
if( ! aEvent.IsDrag() )
|
||||
mousePos = controls()->GetMousePosition();
|
||||
else
|
||||
if( m_router->GetState() == ROUTER::ROUTE_TRACK && aEvent.IsDrag() )
|
||||
{
|
||||
// If the user is moving the mouse quickly while routing then clicks will come in as
|
||||
// short drags. In this case we want to use the drag origin rather than the current
|
||||
// mouse position.
|
||||
mousePos = aEvent.DragOrigin();
|
||||
}
|
||||
|
||||
if( m_router->Settings().Mode() != RM_MarkObstacles &&
|
||||
( m_router->GetCurrentNets().empty() || m_router->GetCurrentNets().front() < 0 ) )
|
||||
|
|
Loading…
Reference in New Issue