pull request

Linus Torvalds torvalds at linux-foundation.org
Sun Aug 19 14:41:51 PDT 2012


On Sun, Aug 19, 2012 at 2:20 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>
> On Aug 19, 2012, at 12:21 PM, Dirk Hohndel wrote:
>
>> Yep. And I think I can tell that we are being called while expanded and therefore adjust the tracking logic.
>> Basically, if we are expanded and the whole group is selected, don't manually unselect the children.
>
> Nope, that analysis is wrong. We already do the right thing when called,
> regardless of whether we are expanded or not.
>
> Right now I think this is a genuine gtk bug.

No, the documentation is clear about it: as mentioned, it states that
the modification callback can happen whether a particular thing is
going to be changed or not. You're just supposed to return true or
false to say whether the change would be *allowed*. The fact that you
use it to figure out if it will happen isn't how it's supposed to be
done.

So not technically a bug. It's just that the gtk selection for trees
seems to not really be meant for this kind of hierarchical thing,
which is why it acts wrong wrt the parent entry to begin with, and why
you try to work around it in the selection-modified callback.

I think that we would need to (a) keep track of the parent state too
(right now you only track the individual dives) and (b) *after* the
selection logic, go through and see what changed - and if a parent
changed, change the children at that point.

I'll try to see if I can do that.

                 Linus


More information about the subsurface mailing list