The divelist airmix display is kind of broken: it only looks at the
first cylinder, and it only looks at Oxygen content, not Helium.
But at least we can make sure to update it when somebody edits the
cylinder information, instead of leaving it extra broken.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
get_string(str, dive->cylinder[0].type.description);
}
get_string(str, dive->cylinder[0].type.description);
}
+/*
+ * Set up anything that could have changed due to editing
+ * of dive information
+ */
static void fill_one_dive(struct dive *dive,
GtkTreeModel *model,
GtkTreeIter *iter)
static void fill_one_dive(struct dive *dive,
GtkTreeModel *model,
GtkTreeIter *iter)
get_cylinder(dive, &cylinder);
get_location(dive, &location);
get_cylinder(dive, &cylinder);
get_location(dive, &location);
- /*
- * We only set the fields that changed: the strings.
- * The core data itself is unaffected by units
- */
gtk_list_store_set(GTK_LIST_STORE(model), iter,
DIVE_NR, dive->number,
DIVE_LOCATION, location,
gtk_list_store_set(GTK_LIST_STORE(model), iter,
DIVE_NR, dive->number,
DIVE_LOCATION, location,
DIVE_RATING, dive->rating,
DIVE_SAC, dive->sac,
DIVE_OTU, dive->otu,
DIVE_RATING, dive->rating,
DIVE_SAC, dive->sac,
DIVE_OTU, dive->otu,
+ DIVE_NITROX, dive->cylinder[0].gasmix.o2,