]> git.saurik.com Git - wxWidgets.git/commitdiff
Refresh the old current row when right clicking in wxDataViewCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 19 Jul 2011 22:35:57 +0000 (22:35 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 19 Jul 2011 22:35:57 +0000 (22:35 +0000)
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

src/generic/datavgen.cpp

index 5c773a9f7a007052764f16e147c557357cee3325..7172780600a55ec152e753978338940c1f57df64 100644 (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 ) );
         }
     }