GNOME Bugzilla – Bug 109289
Left over row reference on set_model()
Last modified: 2011-02-04 16:11:59 UTC
When the model for a GtkTreeView is switched with gtk_tree_view_set_model() tree_view->private->top_row is left pointing to the old model. The attached patch fixes this. I'm also wondering if there are some more row references that need to be reset ... there seem to be various other row references in GtkTreeViewPrivate that aren't reset in gtk_tree_view_set_model().
Created attachment 15217 [details] [review] Patch to clear ->top_row
Hmm yeah, you are right. There is more stuff which needs to be cleared, I attached an updated patch. For future reference: jrb and I decided that clearing the current drag in _set_model doesn't make sense. Other than that, how does this look to you jrb?
Created attachment 15442 [details] [review] updated patch
o/~ another patch for jrb o/~
don't clear the drag one, the rest is ok.
Committed on gtk-2-2 and HEAD.