eeschema-gal: don't warp cursor back to mouse when using hotkey to emulate a mouse click
Fixes: lp:1797273 * https://bugs.launchpad.net/kicad/+bug/1797273
This commit is contained in:
parent
441cac9f1b
commit
12567c7500
|
@ -480,10 +480,11 @@ bool SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition,
|
||||||
}
|
}
|
||||||
else if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK )
|
else if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK )
|
||||||
{
|
{
|
||||||
OnLeftClick( aDC, aPosition );
|
auto pos = GetCrossHairPosition();
|
||||||
|
OnLeftClick( aDC, pos );
|
||||||
|
|
||||||
if( hotKey->m_Idcommand == HK_LEFT_DCLICK )
|
if( hotKey->m_Idcommand == HK_LEFT_DCLICK )
|
||||||
OnLeftDClick( aDC, aPosition );
|
OnLeftDClick( aDC, pos );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -676,7 +676,7 @@ void SCH_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event )
|
||||||
// Compute the cursor position in drawing units. Also known as logical units to wxDC.
|
// Compute the cursor position in drawing units. Also known as logical units to wxDC.
|
||||||
//pos = wxPoint( DC.DeviceToLogicalX( pos.x ), DC.DeviceToLogicalY( pos.y ) );
|
//pos = wxPoint( DC.DeviceToLogicalX( pos.x ), DC.DeviceToLogicalY( pos.y ) );
|
||||||
|
|
||||||
auto p = GetViewControls()->GetMousePosition();
|
auto p = GetViewControls()->GetCursorPosition( false );
|
||||||
|
|
||||||
wxPoint pos ((int)p.x, (int)p.y);
|
wxPoint pos ((int)p.x, (int)p.y);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue