summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-13 08:57:46 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-13 21:41:41 -0400
commit954820aa81cb52cfe4442f2c6e81117827e32ccc (patch)
tree5392d9b44ed57542fb60be46a384bf783ed43c59 /desktop-widgets/mainwindow.h
parentf0e349cdd68c259f07fd5867d8360cd8d65d50ef (diff)
downloadsubsurface-954820aa81cb52cfe4442f2c6e81117827e32ccc.tar.gz
Dive site: explicitly init displayed_dive_site on show widget
The global object "displayed_dive_site" is used to store the old dive site data for the edit-dive-site widget. The fields of the widget were initialized from this object in the show event. Therefore the object was updated in numerous parts of the code to make sure that it was up-to-date. Instead, move the initialization of the object to the function that also initiatlizes the fields. Call this function explicitly before showing the widget. This makes the data-fow distinctly easier to understand. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/mainwindow.h')
-rw-r--r--desktop-widgets/mainwindow.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h
index ae3b081a4..6833c5531 100644
--- a/desktop-widgets/mainwindow.h
+++ b/desktop-widgets/mainwindow.h
@@ -214,6 +214,7 @@ private:
void enterState(CurrentState);
bool filesAsArguments;
UpdateManager *updateManager;
+ LocationInformationWidget *diveSiteEdit;
bool plannerStateClean();
void setupForAddAndPlan(const char *model);