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 667765 - Changing selection no longer sets cursor
Changing selection no longer sets cursor
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
3.3.x
Other Linux
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2012-01-12 12:45 UTC by Colin Watson
Modified: 2012-01-17 11:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case (674 bytes, text/x-python)
2012-01-12 12:45 UTC, Colin Watson
Details

Description Colin Watson 2012-01-12 12:45:30 UTC
Created attachment 205093 [details]
test case

Calling gtk_tree_selection_select_path used to move the GtkTreeView's cursor to match the new selection.  It no longer does so.  As a result, anything that changes the selection programmatically and doesn't also call gtk_tree_view_set_cursor_on_cell or similar ends up with incorrect defaults for keyboard navigation.  This seems like a regression to me.

I originally found out about this by way of a bug report on the Ubuntu installer (https://launchpad.net/bugs/911905), but that's a bit large, so I've attached a reduced test case; I hope PyGI is OK for such things.  With GTK+ 3.2.0, this starts with the selection and cursor both on "Test cell 2", and pressing Enter prints "Test cell 2".  With GTK+ 3.3.6, this starts with the selection on "Test cell 2" but the cursor on "Test cell 1", and pressing Enter prints "Test cell 1".
Comment 1 Sebastien Bacher 2012-01-17 11:30:39 UTC
Seems to work in 3.3.8, I think it was fixed by
http://git.gnome.org/browse/gtk+/commit/?id=133179fd257a7fe06bc5348328dca0a6f8b78a08

"treeview: Do not focus a path on model change
Instead, focus nothing and wait until we get focus before doing so. This restores previous behaviour but still emits proper cursor-changed events."