GtkWxTreeModel* GetGtkModel() { return m_gtk_model; }
bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item );
- bool ItemDeleted( const wxDataViewItem &item );
+ bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item );
bool ItemChanged( const wxDataViewItem &item );
bool ValueChanged( const wxDataViewItem &item, unsigned int col );
bool Cleared();
~wxGtkDataViewModelNotifier();
virtual bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item );
- virtual bool ItemDeleted( const wxDataViewItem &item );
+ virtual bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item );
virtual bool ItemChanged( const wxDataViewItem &item );
virtual bool ValueChanged( const wxDataViewItem &item, unsigned int col );
virtual bool Cleared();
return true;
}
-bool wxGtkDataViewModelNotifier::ItemDeleted( const wxDataViewItem &item )
+bool wxGtkDataViewModelNotifier::ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item )
{
GtkTreeIter iter;
iter.stamp = m_wxgtk_model->stamp;
GTK_TREE_MODEL(m_wxgtk_model), path );
gtk_tree_path_free (path);
- m_owner->GtkGetInternal()->ItemDeleted( item );
+ m_owner->GtkGetInternal()->ItemDeleted( parent, item );
return true;
}
return true;
}
-bool wxDataViewCtrlInternal::ItemDeleted( const wxDataViewItem &item )
+bool wxDataViewCtrlInternal::ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item )
{
- wxGtkTreeModelNode *parent = FindParentNode( item );
- parent->DeleteChild( item.GetID() );
+ wxGtkTreeModelNode *parent_node = FindNode( parent );
+ parent_node->DeleteChild( item.GetID() );
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_DELETED, m_owner->GetId() );
event.SetEventObject( m_owner );
GtkAllocation *alloc,
wxDataViewCtrl *win )
{
-
wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst();
while (node)
{