Re: clear() on TreeView causes select-events
- From: Reuben Rissler <silrep emypeople net>
- To: gtk-app-devel-list gnome org
- Subject: Re: clear() on TreeView causes select-events
- Date: Tue, 3 Jul 2018 21:19:54 -0400
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]