Don't send events when expanding internally, only after wxDataViewModel::ItemAdded was called

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2007-07-24 09:25:35 +00:00
parent d8331a013b
commit effd54b05e

View File

@ -2252,10 +2252,6 @@ void wxDataViewCtrlInternal::InitTree()
void wxDataViewCtrlInternal::BuildBranch( wxGtkTreeModelNode *node )
{
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_ADDED, m_owner->GetId() );
event.SetEventObject( m_owner );
event.SetModel( m_owner->GetModel() );
if (node->GetChildCount() == 0)
{
wxDataViewItem child = m_wx_model->GetFirstChild( node->GetItem() );
@ -2265,9 +2261,8 @@ void wxDataViewCtrlInternal::BuildBranch( wxGtkTreeModelNode *node )
node->AddNode( new wxGtkTreeModelNode( node, child, this ) );
else
node->AddLeave( child.GetID() );
event.SetItem( child );
m_owner->GetEventHandler()->ProcessEvent( event );
// Don't send any events here
child = m_wx_model->GetNextSibling( child );
}