From f175c1a9d7627e3a0658e8a7d29ea03df6a905c9 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 19 Feb 2013 13:05:45 -0800 Subject: Remember pre-existing trip expansion state when autogrouping This just adds the "remember_tree_state()" and "restore_tree_state()" calls around the divelist update when autogrouping is turned on: that way existing expanded groups aren't blindly collapsed. It makes it much easier to see what autogrouping does if it only groups a few dives, because the overall state of the divelist isn't radically changed. Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- gtk-gui.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk-gui.c b/gtk-gui.c index cd9f7579a..a8372af83 100644 --- a/gtk-gui.c +++ b/gtk-gui.c @@ -980,7 +980,9 @@ static void autogroup_cb(GtkWidget *w, gpointer data) autogroup = !autogroup; if (! autogroup) remove_autogen_trips(); + remember_tree_state(); dive_list_update_dives(); + restore_tree_state(); } void set_autogroup(gboolean value) -- cgit v1.2.3-70-g09d2