From f1087d7fd51a1238a484c7e2761f62a5f9e04776 Mon Sep 17 00:00:00 2001 From: mikek Date: Thu, 1 Feb 2018 01:14:18 +0100 Subject: [PATCH] Fix missing selection event in generic wxDataViewCtrl No event was sent if the selection was narrowed by clicking on an already selected item without any key modifiers pressed. Fix this by generating an event always on click and not only when selecting a new item. Closes #17881. --- docs/changes.txt | 1 + src/generic/datavgen.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 5f1698d1b7..1c82160ae2 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -248,6 +248,7 @@ wxMSW: - Fix focus-related problems when using native wxProgressDialog. - Fix crash when reparenting the currently focused window to another TLW. - Fix sending wxEVT_TEXT_ENTER when using auto-completion (Dubby). +- Fix missing selection event on click in multiselection wxDataViewCtrl (mikek). wxOSX: diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 34fdcc7409..79daf5517d 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -4728,9 +4728,9 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) if ( UnselectAllRows(m_lineSelectSingleOnUp) ) { SelectRow( m_lineSelectSingleOnUp, true ); - SendSelectionChangedEvent( GetItemByRow(m_lineSelectSingleOnUp) ); } - //else: it was already selected, nothing to do + + SendSelectionChangedEvent( GetItemByRow(m_lineSelectSingleOnUp) ); } // If the user click the expander, we do not do editing even if the column