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

Lubomir I. Ivanov neolit123 at gmail.com
Mon Feb 18 15:42:46 PST 2013


On 19 February 2013 01:35, Linus Torvalds <torvalds at linux-foundation.org> wrote:
> On Mon, Feb 18, 2013 at 2:46 PM, Linus Torvalds
> <torvalds at linux-foundation.org> wrote:
>>
>> No, not only does the selected_dive go away, we also have zero selected dives.
>>
>> It's just the statistics window that doesn't update. There's probably
>> some logic along the lines of "nothing selected, so don't bother
>> updating the statistics". So the "Stats" notebook keeps showing the
>> old selection state.
>
> Ok, the cause for that is that "update_dive()" only does the
> "show_dive_stats(new_dive);" thing if "new_dive" is non-NULL.
>
> So any time there is no current dive, we stop updating statistics, and
> show the old stats.
>
> If somebody wants to fix it, you'll need to make show_dive_stats()
> able to handle a NULL dive, and then call it unconditionally, the same
> way we call show_dive_info() unconditionally whether we have a dive or
> not.
>
> I do have a very hacky thing to make "select just the dive trip" work
> the way you'd expect it. I'll send that as a separate email.
>

i've just sent another quick attempt / alternative.
[PATCH] Different logic for dive selection when trips are expanded

you can check if it makes any sense, but if you wish to show the old
stats and profile it may be a better choice.

lubomir
--


More information about the subsurface mailing list