X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..d467e0c72da3a270592719f1e819db3c4984c0ca:/src/generic/listctrl.cpp?ds=sidebyside diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 63e50fb380..607477e3eb 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1297,12 +1297,12 @@ void wxListHeaderWindow::OnMouse( wxMouseEvent &event ) { // we want to work with logical coords #if wxUSE_GENERIC_LIST_EXTENSIONS - int x, y; - m_owner->CalcUnscrolledPosition(event.GetX(), event.GetY(), &x, &y); + int x; + m_owner->CalcUnscrolledPosition(event.GetX(), 0, &x, NULL); #else // !wxUSE_GENERIC_LIST_EXTENSIONS int x = event.GetX(); - int y = event.GetY(); #endif // wxUSE_GENERIC_LIST_EXTENSIONS + int y = event.GetY(); if (m_isDragging) { @@ -2499,6 +2499,7 @@ void wxListMainWindow::SetItemState( long item, long state, long stateMask ) UnfocusLine( m_current ); m_current = line; FocusLine( m_current ); + if ((m_mode & wxLC_SINGLE_SEL) && oldCurrent) oldCurrent->Hilight( FALSE ); RefreshLine( m_current ); if (oldCurrent) RefreshLine( oldCurrent ); } @@ -2879,7 +2880,7 @@ long wxListMainWindow::FindItem(long start, const wxString& str, bool WXUNUSED(p long pos = start; wxString tmp = str; if (pos < 0) pos = 0; - for (size_t i = pos; i < m_lines.GetCount(); i++) + for (size_t i = (size_t)pos; i < m_lines.GetCount(); i++) { wxListLineData *line = &m_lines[i]; wxString s = ""; @@ -2894,7 +2895,7 @@ long wxListMainWindow::FindItem(long start, long data) { long pos = start; if (pos < 0) pos = 0; - for (size_t i = pos; i < m_lines.GetCount(); i++) + for (size_t i = (size_t)pos; i < m_lines.GetCount(); i++) { wxListLineData *line = &m_lines[i]; wxListItem item;