Reorganize wxDataViewMainWindow::ItemAdded() for better readability.
Reuse common code. No real changes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1976,10 +1976,9 @@ bool wxDataViewMainWindow::ItemAdded(const wxDataViewItem & parent, const wxData
|
||||
wxDataViewVirtualListModel *list_model =
|
||||
(wxDataViewVirtualListModel*) GetOwner()->GetModel();
|
||||
m_count = list_model->GetCount();
|
||||
UpdateDisplay();
|
||||
return true;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
SortPrepare();
|
||||
|
||||
wxDataViewTreeNode * node;
|
||||
@@ -2003,6 +2002,8 @@ bool wxDataViewMainWindow::ItemAdded(const wxDataViewItem & parent, const wxData
|
||||
node->ChangeSubTreeCount(1);
|
||||
|
||||
m_count = -1;
|
||||
}
|
||||
|
||||
UpdateDisplay();
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user