X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e1e1272f2020447bc26e10fc2cb2809e0b8eb856..2fda2145700445519a0ce539b04dc72bae180124:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index a3e4d59802..2f36eec8a0 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2027,7 +2027,8 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) // and the width of the icon, if any static const int MARGIN_BETWEEN_TEXT_AND_ICON = 2; - int ix, iy; + int ix = 0, // init them just to suppress the compiler warnings + iy = 0; const int image = item.m_image; wxImageListType *imageList; if ( image != -1 ) @@ -3407,7 +3408,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetParent()->GetId() ); le.m_itemIndex = m_current; GetLine(m_current)->GetItem( 0, le.m_item ); - le.m_code = (int)event.KeyCode(); + le.m_code = event.GetKeyCode(); le.SetEventObject( parent ); parent->GetEventHandler()->ProcessEvent( le ); } @@ -3424,7 +3425,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) ke.SetEventObject( parent ); if (parent->GetEventHandler()->ProcessEvent( ke )) return; - if (event.KeyCode() == WXK_TAB) + if (event.GetKeyCode() == WXK_TAB) { wxNavigationKeyEvent nevent; nevent.SetWindowChange( event.ControlDown() ); @@ -3442,7 +3443,7 @@ void wxListMainWindow::OnChar( wxKeyEvent &event ) return; } - switch (event.KeyCode()) + switch (event.GetKeyCode()) { case WXK_UP: if ( m_current > 0 )