[PATCH] Select all dives in a trip when said trip is expanded and clicked

Lubomir I. Ivanov neolit123 at gmail.com
Mon Feb 18 13:40:36 PST 2013


On 18 February 2013 20:35, Dirk Hohndel <dirk at hohndel.org> wrote:
> "Lubomir I. Ivanov" <neolit123 at gmail.com> writes:
>
>> From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
>>
>> This patch selects visually all dives within a trip when a
>> trip is expanded (using gtk_tree_selection_select_iter()).
>> If the trip is not expanded it only selects the dives
>> as data (using select_dive()).
>>
>> When calling get_iter_from_idx(), make sure we free memory at
>> the returned address.
>
> Yes, I think this is an improvement over the current situation.
> I have not been able to create a situation where this creates a
> regression.
>
> It still has one flaw that isn't addressed:
>
> Expand a trip.
> Select a dive in the trip
> Collapse the trip - all dives in the trip are selected
> Expand the trip - all dives are selected
>
> This is not a new bug that you introduced, Lubomir, this is a
> shortcoming of Linus' implementation.
>
> I just wanted to point out that that one is still not fixed.
>

hm, i think "row_collapsed_cb" is involved with:

if (selected_children(model, iter))
  gtk_tree_selection_select_iter(selection, iter);

it checks if  there is at least one dive selected and if so, also
selects the trip row, but if the trip row becomes selected then all
children become selected as well.
i would remove this automatic check and select on row collapse, but
i'm not sure what is prefered here.

lubomir
--


More information about the subsurface mailing list