From 5440d0c39fd844b013a98e9c2b1bece6ef8b0c41 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 15 Jul 2014 19:52:05 -0700 Subject: 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 --- qt-ui/models.cpp | 2 -- 1 file changed, 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]) && -- cgit v1.2.3-70-g09d2