diff options
Diffstat (limited to 'subsurface-core')
-rw-r--r-- | subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 9 | ||||
-rw-r--r-- | subsurface-core/subsurface-qt/DiveObjectHelper.h | 1 |
2 files changed, 3 insertions, 7 deletions
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp index e39ba2fbb..a947ea4e3 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp @@ -36,11 +36,6 @@ static QString getFormattedCylinder(struct dive *dive, unsigned int idx) DiveObjectHelper::DiveObjectHelper(struct dive *d) : m_dive(d) { - char buffer[256]; - taglist_get_tagstring(d->tag_list, buffer, 256); - m_tags = QString(buffer); - - int added = 0; QString gas, gases; for (int i = 0; i < MAX_CYLINDERS; i++) { @@ -169,7 +164,9 @@ QString DiveObjectHelper::notes() const QString DiveObjectHelper::tags() const { - return m_tags; + static char buffer[256]; + taglist_get_tagstring(m_dive->tag_list, buffer, 256); + return QString(buffer); } QString DiveObjectHelper::gas() const diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.h b/subsurface-core/subsurface-qt/DiveObjectHelper.h index c5fddbb3d..ba1a02236 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.h +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.h @@ -64,7 +64,6 @@ public: private: QString m_date; QString m_time; - QString m_tags; QString m_gas; QStringList m_weights; QStringList m_cylinders; |