Hi list, I'm having a problem with a TreeView not getting-resorted:

My model was created like this:

model = gtk.TreeStore(object)

and I have set a sort column id for each column. The "object" is a class which contains all information needed by the columns - column data is retrieved via functions that access this class (set via set_cell_data_func). Every 2 seconds, I update all rows and emit the "row_changed" signal like so:

model.row_changed(row.path, row.iter)

But then, the treeview does not sort itself again even if I call model.sort_column_changed() after making all changes. My user-defined sort function doesn't even get called in that case.

Only with changing forth and back

model.set_sort_column_id(1, gtk.SORT_ASCENDING)
model.set_sort_column_id(0, gtk.SORT_ASCENDING)

or if I click on the column header, the treeview gets re-sorted immediately. Of course, this can't be the solution ;-)

I could imagine that the problem is that I only have the "object" in the TreeStore, which of course never changes.

Is there a good solution??

/Best regards
   Andreas
/
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to