From: Vadim Zeitlin Date: Tue, 19 Jul 2011 22:35:57 +0000 (+0000) Subject: Refresh the old current row when right clicking in wxDataViewCtrl. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a09da78b0354c920a92993107cfb268b0701b253 Refresh the old current row when right clicking in wxDataViewCtrl. the generic implementation of wxDataViewCtrl left the old current still focused after selecting another row as current when it was right clicked. Fix this by refreshing the previously current row after unfocusing it. Closes #13330. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 5c773a9f7a..7172780600 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -3723,8 +3723,10 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) if (!IsRowSelected(current)) { SelectAllRows(false); + const unsigned oldCurrent = m_currentRow; ChangeCurrentRow(current); SelectRow(m_currentRow,true); + RefreshRow(oldCurrent); SendSelectionChangedEvent(GetItemByRow( m_currentRow ) ); } }