[PULL REQUEST] Delete multiple dives

Lubomir I. Ivanov neolit123 at gmail.com
Thu Sep 27 14:33:46 PDT 2012

> On 27 September 2012 23:40, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
>> just realized the current master actually returns some Gtk-CRITICAL
>> and crashes which some of these patches solve.
>> e.g. right click (no selection) on the first dive in a trip and "delete dive".
>> i think i've caused this with delete_single_dive() in
>> delete_dive_cb(), but i've tested this multiple times for the previous
>> set of patches. it could be the XML somehow.
> right, i found the cause for that crash.
> it was by my mistake.
> this is the correct order of calls in delete_dive_cb()
>         gtk_tree_model_get_iter(MODEL(dive_list), &iter, path);
>         gtk_tree_model_get(MODEL(dive_list), &iter, DIVE_INDEX, &idx, -1);
>         dive = get_dive(idx);
>         delete_single_dive(&iter);
> delete_single_dive() should be last, since it modifies the tree so
> that update_trip_timestamp() works.
> should i send a separate patch for against master, considering that we
> will go on different route for storing the expanded trips ?

just in case, sent as:
[PATCH] delete_dive_cb: obtain the dive before calling delete_single_dive()


More information about the subsurface mailing list