[pan2] https://bugzilla.gnome.org/show_bug.cgi?id=660030



commit 8886aeaa4278db79a1b727b5b070f35df9ae0263
Author: Heinrich MÃller <sphemuel stud informatik uni-erlangen de>
Date:   Sat Dec 3 08:54:23 2011 +0100

    https://bugzilla.gnome.org/show_bug.cgi?id=660030

 pan/gui/header-pane.cc |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/pan/gui/header-pane.cc b/pan/gui/header-pane.cc
index ddd3f7f..98ac6a4 100644
--- a/pan/gui/header-pane.cc
+++ b/pan/gui/header-pane.cc
@@ -682,7 +682,12 @@ HeaderPane :: on_tree_change (const Data::ArticleTree::Diffs& diffs)
       Row * child (get_row (it->first));
       tmp[parent].push_back (child);
     }
+
+    g_object_ref(G_OBJECT (_tree_store));
+    gtk_tree_view_set_model(GTK_TREE_VIEW(_tree_view), NULL);
     _tree_store->insert_sorted (tmp);
+    gtk_tree_view_set_model(GTK_TREE_VIEW(_tree_view), GTK_TREE_MODEL (_tree_store));
+    g_object_unref(G_OBJECT(_tree_store));
   }
 
   // reparent...
@@ -708,7 +713,12 @@ HeaderPane :: on_tree_change (const Data::ArticleTree::Diffs& diffs)
                          keep.begin(), keep.end(),
                          inserter (kill, kill.begin()), o);
     g_assert (keep.size() + kill.size() == _mid_to_row.size());
+
+    g_object_ref(G_OBJECT (_tree_store));
+    gtk_tree_view_set_model(GTK_TREE_VIEW(_tree_view), NULL);
     _tree_store->remove (kill);
+    gtk_tree_view_set_model(GTK_TREE_VIEW(_tree_view), GTK_TREE_MODEL (_tree_store));
+    g_object_unref(G_OBJECT(_tree_store));
     _mid_to_row.get_container().swap (keep);
   }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]