Clear selection when generic wxDataViewCtrl is cleared.

Selection could retain its old value and become invalid after calling Reset()
before.

Closes #12559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65821 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2010-10-15 23:46:51 +00:00
parent e6777e6575
commit 97e5b0645e

View File

@ -2094,6 +2094,7 @@ bool wxDataViewMainWindow::ValueChanged( const wxDataViewItem & item, unsigned i
bool wxDataViewMainWindow::Cleared()
{
DestroyTree();
m_selection.Clear();
SortPrepare();
BuildTree( GetOwner()->GetModel() );