mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
d872a5c8aa
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>
16 lines
486 B
C
16 lines
486 B
C
#ifndef DIVELIST_H
|
|
#define DIVELIST_H
|
|
|
|
struct dive;
|
|
|
|
extern void dive_list_update_dives(void);
|
|
extern void update_dive_list_col_visibility(void);
|
|
extern void update_dive_list_units(void);
|
|
extern void flush_divelist(struct dive *);
|
|
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
|