Re: Stamp doesn't match in iterator in sort method of a tree model



Hello,

Sometimes, in my sort method, I get an assertion telling me the stamp
found in the iterator doesn't match the one in the model.

I did a lot a test and find a workaround (but not a real solution).

The problem occurs when I filter my list where there are items with children
and all of them hidden. If the 1st child of the 1st item need to be displayed,
it will crash. It works when it should not.

If I only toggle one of the items (not necessarily the 1st one) to show its
children, then there won't be any problem when filtering.

There is also no more problem when I swith my 2 models. i.e. if the filter
contains the sorter which contains the real model. But then my application
doesn't work because the model that is added to the list is not a sorter and
then clicking on column headers generate some errors about this.

So my workaround is to display the list of children in the 1st item on
startup. Then everything works.

It still looks like there is a problem. It seems the TreeModelFilter doesn't
initialize something internal until it has to check for some children. Then
when the TreeModelSorter loops on all items, it gives to my callback the
TreeModelFilter in a bad state.

But there should be another condition. As I tried to create a minimal program
doing this and it worked perfectly, without any of the workarounds. I'll try
to perform other tests. But maybe with these hints, one of the developers may
have an idea about what the real problem could be.

Cheers,

Tian.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]