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
This commit is contained in:
Vadim Zeitlin
2011-07-19 22:35:57 +00:00
parent 2a648479df
commit a09da78b03

View File

@@ -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 ) );
}
}