summaryrefslogtreecommitdiffstats
path: root/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'subsurface-core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r--subsurface-core/subsurface-qt/DiveObjectHelper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
index b05138980..376380b8c 100644
--- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
+++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp
@@ -103,6 +103,11 @@ QString DiveObjectHelper::duration() const
return get_dive_duration_string(m_dive->duration.seconds, QObject::tr("h:"), QObject::tr("min"));
}
+bool DiveObjectHelper::noDive() const
+{
+ return m_dive->duration.seconds == 0 && m_dive->dc.duration.seconds == 0;
+}
+
QString DiveObjectHelper::depth() const
{
return get_depth_string(m_dive->dc.maxdepth.mm, true, true);