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:
Dirk Hohndel 2014-07-02 11:50:28 -07:00
parent d568f96d05
commit a221a6e9f5
4 changed files with 86 additions and 81 deletions

View file

@ -98,7 +98,6 @@ private:
SuitCompletionModel suitModel;
TagCompletionModel tagModel;
DivePictureModel *divePictureModel;
struct dive editedDive; // when editing we do all changes on a copy of the real data and only apply when saved
Completers completers;
void resetPallete();
void saveTags();