GNOME Bugzilla – Bug 667765
Changing selection no longer sets cursor
Last modified: 2012-01-17 11:30:39 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".
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."