On 07/03/2018 05:30 PM, c.buhtz--- via gtk-app-devel-list wrote:
Hello

I observer an interesting behavior (PyGObject, Gtk3.0, Python3.6,
Debian unstable with XFCE desktop):

An item (row) in a TreeView is selected (highlighted).
Then calling .clear() on the TreeView causes an select-event for each
item (row) below that selected item (row).
I have had very similar experiences with liststore.clear() in Python3.5 and Mint 18. To work around this I do:

store = treeview.get_model()  #may not be necessary in your code
treeview.set_model(None)
store.clear()
store.append('my string or etc')
treeview.set_model(store)

Disclaimer > I have no original code. I glean ideas from other people, and pass them on. Please keep the circle going :)

Am I right here?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to