Added wxDataViewListIndexModel::RowsDeleted() and various related corrections
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2048,6 +2048,13 @@ bool Walker( wxDataViewTreeNode * node, DoJob & func )
|
||||
|
||||
bool wxDataViewMainWindow::ItemAdded(const wxDataViewItem & parent, const wxDataViewItem & item)
|
||||
{
|
||||
if (!m_root)
|
||||
{
|
||||
m_count++;
|
||||
UpdateDisplay();
|
||||
return true;
|
||||
}
|
||||
|
||||
SortPrepare();
|
||||
|
||||
wxDataViewTreeNode * node;
|
||||
@@ -2081,6 +2088,19 @@ void DestroyTreeHelper( wxDataViewTreeNode * node);
|
||||
bool wxDataViewMainWindow::ItemDeleted(const wxDataViewItem& parent,
|
||||
const wxDataViewItem& item)
|
||||
{
|
||||
if (!m_root)
|
||||
{
|
||||
m_count--;
|
||||
if( m_currentRow > GetRowCount() )
|
||||
m_currentRow = m_count - 1;
|
||||
|
||||
m_selection.Empty();
|
||||
|
||||
UpdateDisplay();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
wxDataViewTreeNode * node = FindNode(parent);
|
||||
|
||||
wxCHECK_MSG( node != NULL, false, "item not found" );
|
||||
|
Reference in New Issue
Block a user