mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
UI restructure: use a global variable to hold the dive we show / edit
There is massive confusion about what we display when and where and which dive structure (or pointer to a dive structure) contains which information at which stage. This is the first step towards restructuring all of this. This creates a global variable displayed_dive which at any point in time should be what is displayed on screen (both in the profile and in the maintab). It removes the editedDive concept from MainTab. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d568f96d05
commit
a221a6e9f5
4 changed files with 86 additions and 81 deletions
2
dive.h
2
dive.h
|
@ -414,7 +414,7 @@ struct dive_table {
|
|||
};
|
||||
|
||||
extern struct dive_table dive_table;
|
||||
|
||||
extern struct dive displayed_dive;
|
||||
extern int selected_dive;
|
||||
extern unsigned int dc_number;
|
||||
#define current_dive (get_dive(selected_dive))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue