From 7bbcf2fabd0d74d46dba1f3fad5a6d85c6f6eb1d Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 7 Sep 2011 12:01:37 -0700 Subject: Update the dive units without destroyng and rebuilding the dive list Just iterate over the dive list entries, updating them one by one. This avoids the "selection destroyed" when the dive units are changed. And it's cleaner anyway. Signed-off-by: Linus Torvalds --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 4d96fa7c4..e9274129c 100644 --- a/main.c +++ b/main.c @@ -295,8 +295,8 @@ static void unit_dialog(GtkWidget *w, gpointer data) result = gtk_dialog_run(GTK_DIALOG(dialog)); if (result == GTK_RESPONSE_ACCEPT) { output_units = menu_units; + update_dive_list_units(&dive_list); repaint_dive(); - dive_list_update_dives(dive_list); } gtk_widget_destroy(dialog); } -- cgit v1.2.3-70-g09d2