aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-08-10 17:53:11 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-08-11 12:23:33 -0700
commit75be9e727d12ebd122f5dc96737248067afc9629 (patch)
tree78c7c38a65561cef9452ba59e169ab44fd6cc3eb /core
parent624ab3bf9e7785eebcacc38e896f501f1db1fe8d (diff)
downloadsubsurface-75be9e727d12ebd122f5dc96737248067afc9629.tar.gz
Mobile: properly recognize single-weightsystem dives
When removing the max-weightsystem restriction, the semantics of the DiveObjectHelper::singleWeightSystem() function changed: it now returned false for "no weightsystem". Change it back, to 0 or 1 weightsystems, because the mobile frontend uses this to check whether it can edit dive systems. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/subsurface-qt/DiveObjectHelper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp
index 3f740c3e4..3855cef11 100644
--- a/core/subsurface-qt/DiveObjectHelper.cpp
+++ b/core/subsurface-qt/DiveObjectHelper.cpp
@@ -254,7 +254,7 @@ QStringList DiveObjectHelper::weights() const
bool DiveObjectHelper::singleWeight() const
{
- return m_dive->weightsystems.nr == 1;
+ return m_dive->weightsystems.nr <= 1;
}
QString DiveObjectHelper::weight(int idx) const