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 790346 - Gtk.ListStore/TreeStore.set use set_value in override causing more than one signal to be fired
Gtk.ListStore/TreeStore.set use set_value in override causing more than one s...
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: introspection
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2017-11-14 21:37 UTC by infirit
Modified: 2017-11-16 17:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not use set_value in in set override (5.29 KB, patch)
2017-11-14 21:37 UTC, infirit
committed Details | Review

Description infirit 2017-11-14 21:37:21 UTC
Created attachment 363643 [details] [review]
Do not use set_value in in set override

While working on some code that uses a cell_data function I saw it being called more than I was expecting. Turns out in the override the set function loops over  iterable passed to the set function and calls set_value for each iteration. Updating a single row with 100 columns will cause 100 row-changed signals to be emited which is not very nice and inefficient.

Attached patch keeps the validation but use Gtk.List/TreeStore.set to update row instead of set_value.
Comment 1 Christoph Reiter (lazka) 2017-11-15 15:26:30 UTC
Review of attachment 363643 [details] [review]:

thanks, lgtm