]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Repaint dive after equipment change only after updating the cylinder info
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 21 Oct 2011 13:14:45 +0000 (16:14 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 21 Oct 2011 13:14:45 +0000 (16:14 +0300)
Repainting the dive will end up touching the cylinder list store, so we
should finish setting the cylinder info before we repaint it.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
equipment.c

index 4d90741aca21f163dc4c212961270dcdf661f11a..5ff8f0fe6d9bb56aa0bfb1fea3f4f43e33527f78 100644 (file)
@@ -522,7 +522,6 @@ static int edit_cylinder_dialog(int index, cylinder_t *cyl)
                dive->cylinder[index] = *cyl;
                mark_divelist_changed(TRUE);
                flush_divelist(dive);
-               repaint_dive();
        }
 
        gtk_widget_destroy(dialog);
@@ -561,6 +560,7 @@ static void edit_cb(GtkButton *button, gpointer data)
                return;
 
        set_one_cylinder(index, &cyl, model, &iter);
+       repaint_dive();
 }
 
 static void add_cb(GtkButton *button, gpointer data)