GNOME Bugzilla – Bug 319942
gtk_tree_view_get_path_at_pos fails after model reset
Last modified: 2016-05-24 11:33:14 UTC
gtk_tree_view_get_path_at_pos will fail if the TreeView's internal rbtree is not first validated in it's size_request handler. This can have bad consequences when something happens causing invalidation (such as resetting of the model) at an inopportune time before size_request is invoked. An example of this is when the model is (re)set after the first click of a double click. Any attempts to figure out the clicked row in order to activate it in the second-click handler will fail, since the TreeView has not yet gone through a size_request. The current workaround is to call size_request after resetting the model, which causes treeview to validate the first 500 records. The rest are processed with an idle handler. I don't think there is a workaround for treeviews with >500 records. I propose a corrolary for TreeView similar to gtk_ui_manager_ensure_update, which would ensure that the internal tree has been validated.
Kris, can you look at this ?
Kris, any insight ?
I am not planning on supporting changing the model after the first click of a double click unless there is a really good usecase for it.