summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-15 19:52:05 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-15 19:52:05 -0700
commit5440d0c39fd844b013a98e9c2b1bece6ef8b0c41 (patch)
tree9df9c29cfa9e6d3cd5e8df685fa79f6aaa5a0aab /qt-ui
parent3860c3eaa1abf43634be3ce8e8985d8cd5079c67 (diff)
downloadsubsurface-5440d0c39fd844b013a98e9c2b1bece6ef8b0c41.tar.gz
Don't ignore equipment just because the dive list is empty
This was a fun little bug. Tomaz pointed me in the right direction. The UI restructure with the displayed_dive had another unintended side effect here. It is not valid not to set up the widgets just because the dive_list is empty. The displayed_dive isn't on the dive_list until it is saved - so while the user is adding or planning a dive, we still need to show the equipment widgets. Fixes #614 Fixes #601 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/models.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index 4defd72d2..0bdbfccd9 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -304,8 +304,6 @@ void CylindersModel::clear()
void CylindersModel::updateDive()
{
clear();
- if (dive_table.nr == 0)
- return;
rows = 0;
for (int i = 0; i < MAX_CYLINDERS; i++) {
if (!cylinder_none(&displayed_dive.cylinder[i]) &&