summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2013-02-19 13:05:45 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-19 13:16:50 -0800
commitf175c1a9d7627e3a0658e8a7d29ea03df6a905c9 (patch)
treed7572b78b5384952e8374feb5df91c2861f1f134 /gtk-gui.c
parente544594d9b95b8b67f65616d04fd0555ab8ab85d (diff)
downloadsubsurface-f175c1a9d7627e3a0658e8a7d29ea03df6a905c9.tar.gz
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 <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c2
1 files changed, 2 insertions, 0 deletions
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)