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>
This commit is contained in:
Dirk Hohndel 2014-07-15 19:52:05 -07:00
parent 3860c3eaa1
commit 5440d0c39f

View file

@ -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]) &&