diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-10-13 10:59:16 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-13 21:41:41 -0400 |
commit | 5d3967ce846ed4876abeb43ebe2d919064050ed6 (patch) | |
tree | 246ae5a2cc649eff0bd911a072b956a8440167a4 /desktop-widgets/locationinformation.cpp | |
parent | 954820aa81cb52cfe4442f2c6e81117827e32ccc (diff) | |
download | subsurface-5d3967ce846ed4876abeb43ebe2d919064050ed6.tar.gz |
Dive site: un-globalize displayed_dive_site
The global object displayed_dive_site is used a a backing-store
by the dive-site-edit widget. All external accesses were removed,
therefore make the object local to the widget.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/locationinformation.cpp')
-rw-r--r-- | desktop-widgets/locationinformation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index 3f87454da..30146b5be 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -19,6 +19,7 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBox(parent), modified(false) { + memset(&displayed_dive_site, 0, sizeof(displayed_dive_site)); ui.setupUi(this); ui.diveSiteMessage->setCloseButtonVisible(false); @@ -373,7 +374,7 @@ QVariant DiveLocationModel::data(const QModelIndex &index, int role) const case Qt::DisplayRole: return new_ds_value[index.row()]; case Qt::ToolTipRole: - return displayed_dive_site.uuid ? + return displayed_dive.dive_site_uuid ? tr("Create a new dive site, copying relevant information from the current dive.") : tr("Create a new dive site with this name"); case Qt::DecorationRole: |