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>
This commit is contained in:
Linus Torvalds 2013-02-19 13:05:45 -08:00 committed by Dirk Hohndel
parent e544594d9b
commit f175c1a9d7

View file

@ -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)