From 14511a8bec20e5f322513e746c1281cb86d453e2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 23 Aug 2021 00:16:32 +0200 Subject: [PATCH] Fix selection on right click in generic wxListCtrl Right clicking item always selected it, which made it possible to have multiple selected items even in a single-selection control. Restore HighlightAll(false) erroneously removed by fedc80eee3 (Improve selection and focus events generation in wxGenericLisCtrl, 2020-09-06) to fix this and restore the correct old behaviour. Note that even in multiple selection mode right clicking a previously unselected item should still clear the selection, as it does it in the other GTK programs (and also under MSW). --- src/generic/listctrl.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 81fe66ca8a..da822d8512 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2682,6 +2682,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) // Multi-selections should not be cleared if a selected item is clicked. if (!IsHighlighted(current)) { + HighlightAll(false); ChangeCurrent(current); HighlightOnly(m_current); }