mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
desktop: use current_dive instead of displayed_dive on equipment tab
Since the displayed data is extracted from current_dive it makes no sense to query displayed_dive for the dive mode. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
532449644e
commit
3b8b328639
1 changed files with 2 additions and 1 deletions
|
@ -130,7 +130,8 @@ void TabDiveEquipment::updateData()
|
|||
suitModel.updateModel();
|
||||
|
||||
ui.cylinders->view()->hideColumn(CylindersModel::DEPTH);
|
||||
if (get_dive_dc(&displayed_dive, dc_number)->divemode == CCR)
|
||||
bool is_ccr = current_dive && get_dive_dc(current_dive, dc_number)->divemode == CCR;
|
||||
if (is_ccr)
|
||||
ui.cylinders->view()->showColumn(CylindersModel::USE);
|
||||
else
|
||||
ui.cylinders->view()->hideColumn(CylindersModel::USE);
|
||||
|
|
Loading…
Reference in a new issue