Fix uninitialized variable (from Coverity scan).

This commit is contained in:
Jeff Young 2020-01-10 17:20:10 +00:00
parent cc5a42ff41
commit c27e278e58
2 changed files with 6 additions and 0 deletions

View File

@ -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;
}

View File

@ -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;
}