diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index f2615a01b9..edae453f8b 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -1465,7 +1465,7 @@ void MyListCtrl::OnRightClick(wxMouseEvent& event) default: where = "not clear exactly where on"; break; } - wxLogMessage("Right double click %s item %ld, subitem %ld", + wxLogMessage("Right click %s item %ld, subitem %ld", where, item, subitem); } diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 81fe66ca8a..ab337f337f 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2682,8 +2682,9 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) // Multi-selections should not be cleared if a selected item is clicked. if (!IsHighlighted(current)) { + size_t oldCurrent = m_current; ChangeCurrent(current); - HighlightOnly(m_current); + HighlightOnly(m_current, oldCurrent); } SendNotify( current, wxEVT_LIST_ITEM_RIGHT_CLICK, event.GetPosition() ); @@ -5543,9 +5544,12 @@ long wxGenericListCtrl::FindItem( long WXUNUSED(start), const wxPoint& pt, return m_mainWin->FindItem( pt ); } -// TODO: sub item hit testing -long wxGenericListCtrl::HitTest(const wxPoint& point, int& flags, long *) const +long wxGenericListCtrl::HitTest(const wxPoint& point, int& flags, long *col) const { + // TODO: sub item hit testing + if ( col ) + *col = -1; + return m_mainWin->HitTest( (int)point.x, (int)point.y, flags ); }