Display Behaviour Change on Trip Selection

Lubomir I. Ivanov neolit123 at gmail.com
Mon Feb 18 07:35:36 PST 2013


On 18 February 2013 15:52, Amit Chaudhuri <amit.k.chaudhuri at gmail.com> wrote:
> Lubomir, that seems to cure the "dive plot blanks" so it's an improvement
> from my point of view.  Most stats seem ok too. :)
>
> But the stats / dives counter is still a bit broken.  If the trip has 5
> dives I get 5,5, 4, 3, 2, 1 as I click my way down from trip through each of
> the dives.  Clicking back the other way I get 1, 1, 1, 1, 1, 5
>

just sent a new patch that tries to fix that.
[PATCH] Select all dives in a trip when said trip is expanded and clicked

my previous attempt was very silly...
the current fix does something else however, so there should be
confirmation if this is desired.
it is also quote inefficient.

when a trip is collapsed, we don't care if a row of an actual dive
(child) is selected (GTK selection) and we can select it only as
"data" using select_dive().
but if the trip is expanded we might want to also select the rows (GTK
selection).

i personally do not understand the need for separation here between
dive selection (dive->selected) as data or as visual indication (GTK
selection), unless some more complicated interaction is going on
behind the scene. this is usually not a bad idea i must admit thought,
but the naming of the functions should be more descriptive.

most importantly the user _does not care_ if we have 3 different types
of selection logic, of course.

lubomir
--

p.s. obvious semi-rant indicates that divelist.c may be soon ready to
be nuked from far orbit :-)


More information about the subsurface mailing list