pull request

Linus Torvalds torvalds at linux-foundation.org
Sun Aug 19 17:48:26 PDT 2012


On Sun, Aug 19, 2012 at 3:10 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
>> I'll try to see if I can do that.
>
> Feel free. I was going to tackle this tomorrow. But I won't mind if you
> get to it first :-)

Ok, I have something that approaches being usable, but won't get
around to finishing it today.

I'm doing major surgery, and simply tracking the 'selected' status in
the tree model. That way I currently actually get the case of
"somebody selected a dive and then collapsed the group" case right
too. The concept seems to work, and I track selections fine, but right
now I don't fill in the old "selectiontracker" thing at all, so the
things that use that won't work.

I'll finish it up tomorrow.

However, some behavior will end up being basically ambiguous. For
example, let's say that we shift-select a range that covers a
*partial* group. Now, gtk will select the group entry itself (because
it's part of the range). Should that then mean that we select all the
sub-entries (because the group entry itself got selected?

Or should we (for example) say "selecting a group selects the
sub-entries only if the group was collapsed, and if it was expanded,
you need to select the entries explicitly"?

I can do either, and I think either can be argued for. What is really
hard for me to do is "selecting a range that includes the exploded
group entry but not the whole group will mahically just select the
partial group" _and_ "selecting only the exploded group entry will
select the whole group". Why? Because I can't really tell the
difference between somebody clicking things furiously by hand, and a
shift-click that selects a number of entries in one go. So it's
ambiguous whether I should select the whole group (because the group
entry got selected) or whether I should just select a partial group.

For a similar reason, when you go from non-date view to date view, I
don't know if I should select the group header fields, because they
didn't exist in the non-date selection at all. So right now, if you
select everything in date view (which selects the group header lines
too), then move to non-date view, and immediately move back, all the
header lines get unselected (but all the individual dives stay
selected).

These issues aren't any worse than what we currently have, I'm just
bringing them up as "I can't make everything magically always do what
a human might expect", because some cases are just ambiguous.

              Linus


More information about the subsurface mailing list