diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-11-21 13:53:36 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-11-21 13:53:36 -0800 |
commit | d872a5c8aab858fa7a06b6f91f2dda57a43a6306 (patch) | |
tree | 44e2953179ee03e9c0340c5eadf69872bfd23b02 /divelist.h | |
parent | a8d413551e3b6c7c2ab9d092b67e0976550e2115 (diff) | |
download | subsurface-d872a5c8aab858fa7a06b6f91f2dda57a43a6306.tar.gz |
Make sure there are no invisible selected dives after import / download
Prior to this commit, gtk often decided to collapse the trip with the
selected dive after the user imported or downloaded additional dives.
Since Subsurface tracks dives as being selected even after gtk collapses a
trip (which clears all selection state as far as gtk is concerned) this
could lead to the strange situation that the user could click on a new
dive to select it without unselecting the already selected dive - and
suddenly edit or delete did things that were entirely unwanted.
With this change we explicitly save and then restore the tree state around
import and download operations. This ensures that the same dive(s) stay
selected and trips stay expanded and therefore avoids the issues described
here.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.h')
-rw-r--r-- | divelist.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/divelist.h b/divelist.h index 45c1a18f8..0a635c2ed 100644 --- a/divelist.h +++ b/divelist.h @@ -11,4 +11,6 @@ extern void update_cylinder_related_info(struct dive *); extern void mark_divelist_changed(int); extern int unsaved_changes(void); extern void remove_autogen_trips(void); +extern void remember_tree_state(void); +extern void restore_tree_state(void); #endif |