summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-07-17 08:55:02 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-17 00:04:32 -0700
commit6f8dc22e08cfbbed5670cff6b7b68ec651611d04 (patch)
treea18e7303830f33c2bc3d8d6609c4f73b6f989598 /qt-ui
parentb4679c819fde45e0597873b87cc0ccb1650b70de (diff)
downloadsubsurface-6f8dc22e08cfbbed5670cff6b7b68ec651611d04.tar.gz
Use get_cylinder_index instead of get_gasidx
Replace get_gasmix_from_event and get_gasidx with get_cylinder_index. get_cylinder_index actually knows about both types of gaschange events and the difference between them. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/diveeventitem.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/qt-ui/profile/diveeventitem.cpp b/qt-ui/profile/diveeventitem.cpp
index 201b4890a..b614e8301 100644
--- a/qt-ui/profile/diveeventitem.cpp
+++ b/qt-ui/profile/diveeventitem.cpp
@@ -128,9 +128,8 @@ bool DiveEventItem::shouldBeHidden()
* Don't bother showing them if they match the first gas already
*/
if (!strcmp(event->name, "gaschange") && !event->time.seconds) {
- struct gasmix *mix = get_gasmix_from_event(event);
struct dive *dive = current_dive;
- if (dive && get_gasidx(dive, mix) <= 0)
+ if (dive && get_cylinder_index(dive, event) == 0)
return true;
}
for (int i = 0; i < evn_used; i++) {