From effd54b05efc46c21a7915f39c4e0418cf4c5612 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 24 Jul 2007 09:25:35 +0000 Subject: [PATCH] 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 --- src/gtk/dataview.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 926d1e4645..0e0bfce9a1 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -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 ); }