summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/locationinformation.cpp3
-rw-r--r--desktop-widgets/locationinformation.h2
2 files changed, 4 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:
diff --git a/desktop-widgets/locationinformation.h b/desktop-widgets/locationinformation.h
index 402c434e1..3e0da4aa6 100644
--- a/desktop-widgets/locationinformation.h
+++ b/desktop-widgets/locationinformation.h
@@ -3,6 +3,7 @@
#define LOCATIONINFORMATION_H
#include "core/units.h"
+#include "core/divesite.h"
#include "ui_locationInformation.h"
#include "qt-models/divelocationmodel.h"
#include <stdint.h>
@@ -50,6 +51,7 @@ private:
bool modified;
QAction *acceptAction, *rejectAction;
GPSLocationInformationModel filter_model;
+ dive_site displayed_dive_site;
};
class DiveLocationFilterProxyModel : public QSortFilterProxyModel {