From 8405ad2ed66a04f4d6ad7adfe07ffa3440656181 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 23 Dec 2024 21:45:05 +0100 Subject: [PATCH] Remove commented out code in ItemDeleted() There is no need to leave the code which is described as being wrong. No real changes. --- src/gtk/dataview.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 0f9e73eb7b..b2b000c8d8 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -1824,16 +1824,9 @@ bool wxGtkDataViewModelNotifier::ItemAdded( const wxDataViewItem &parent, const bool wxGtkDataViewModelNotifier::ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item ) { GtkWxTreeModel *wxgtk_model = m_internal->GetGtkModel(); -#if 0 + // using _get_path for a deleted item cannot be - // a good idea - GtkTreeIter iter; - iter.stamp = wxgtk_model->stamp; - iter.user_data = (gpointer) item.GetID(); - wxGtkTreePath path(wxgtk_tree_model_get_path( - GTK_TREE_MODEL(wxgtk_model), &iter )); -#else - // so get the path from the parent + // a good idea so get the path from the parent GtkTreeIter parentIter; parentIter.stamp = wxgtk_model->stamp; parentIter.user_data = (gpointer) parent.GetID(); @@ -1843,7 +1836,6 @@ bool wxGtkDataViewModelNotifier::ItemDeleted( const wxDataViewItem &parent, cons // and add the final index ourselves int index = m_internal->GetIndexOf( parent, item ); gtk_tree_path_append_index( path, index ); -#endif m_internal->ItemDeleted( parent, item );