diff --git a/common/view/view_controls.cpp b/common/view/view_controls.cpp index bce53e3ecb..6f28180c61 100644 --- a/common/view/view_controls.cpp +++ b/common/view/view_controls.cpp @@ -71,6 +71,8 @@ void VC_SETTINGS::Reset() m_panWithRightButton = false; m_panWithLeftButton = false; m_lastKeyboardCursorPositionValid = false; + m_lastKeyboardCursorPosition = { 0.0, 0.0 }; + m_lastKeyboardCursorCommand = 0; } diff --git a/common/view/wx_view_controls.cpp b/common/view/wx_view_controls.cpp index 5e13c0e44f..9009449b50 100644 --- a/common/view/wx_view_controls.cpp +++ b/common/view/wx_view_controls.cpp @@ -129,6 +129,8 @@ WX_VIEW_CONTROLS::WX_VIEW_CONTROLS( VIEW* aView, wxScrolledCanvas* aParentPanel this->Connect( wxEVT_TIMER, wxTimerEventHandler( WX_VIEW_CONTROLS::onTimer ), NULL, this ); m_settings.m_lastKeyboardCursorPositionValid = false; + m_settings.m_lastKeyboardCursorPosition = { 0.0, 0.0 }; + m_settings.m_lastKeyboardCursorCommand = 0; } @@ -505,6 +507,8 @@ void WX_VIEW_CONTROLS::SetCursorPosition( const VECTOR2D& aPosition, bool aWarpV else { m_settings.m_lastKeyboardCursorPositionValid = false; + m_settings.m_lastKeyboardCursorPosition = { 0.0, 0.0 }; + m_settings.m_lastKeyboardCursorCommand = 0; m_cursorWarped = true; }