After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 109289 - Left over row reference on set_model()
Left over row reference on set_model()
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.2.x
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2003-03-26 20:52 UTC by Owen Taylor
Modified: 2011-02-04 16:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to clear ->top_row (690 bytes, patch)
2003-03-26 20:54 UTC, Owen Taylor
none Details | Review
updated patch (1.31 KB, patch)
2003-04-03 18:51 UTC, Kristian Rietveld
none Details | Review

Description Owen Taylor 2003-03-26 20:52: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().
Comment 1 Owen Taylor 2003-03-26 20:54:45 UTC
Created attachment 15217 [details] [review]
Patch to clear ->top_row
Comment 2 Kristian Rietveld 2003-04-03 18:50:57 UTC
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?
Comment 3 Kristian Rietveld 2003-04-03 18:51:23 UTC
Created attachment 15442 [details] [review]
updated patch
Comment 4 Kristian Rietveld 2003-05-22 22:37:48 UTC
o/~ another patch for jrb o/~
Comment 5 Kristian Rietveld 2003-05-28 18:32:20 UTC
don't clear the drag one, the rest is ok.
Comment 6 Kristian Rietveld 2003-05-29 16:16:41 UTC
Committed on gtk-2-2 and HEAD.