From 9439bc695589837900ebeb7db5fd029851cd1096 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 4 Feb 2010 01:20:02 +0000 Subject: [PATCH] Fix selection event sending for Ctrl-click in generic wxDataViewCtrl. Ctrl-clicking on the only currently selected item in wxDataViewCtrl crashed because we dereferenced first element of the empty m_selection array when generating the selection change event. Instead, send the event for the current item, this should be more consistent with the native versions behaviour and at the very least doesn't crash. Closes #11684. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63382 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index abb561ae6e..9ae974c053 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -3694,7 +3694,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) { ChangeCurrentRow(current); ReverseRowSelection(m_currentRow); - SendSelectionChangedEvent(GetItemByRow(m_selection[0]) ); + SendSelectionChangedEvent(GetItemByRow(m_currentRow)); } else if (event.ShiftDown()) { -- 2.45.2