diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-11 12:18:10 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-12-11 12:18:10 -0800 |
commit | 4df81487fefc6eb6b2a1a1de6a48e2f2f534b18a (patch) | |
tree | 182919e64010aea8dd3683b0a3a61a56fbfd2325 | |
parent | 10c74eb31dec184780a3677ee360bcdfc58ef249 (diff) | |
download | subsurface-4df81487fefc6eb6b2a1a1de6a48e2f2f534b18a.tar.gz |
Make sure to update divelist O2 information after editing
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>
-rw-r--r-- | divelist.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/divelist.c b/divelist.c index 36c40b8b2..6674f1df4 100644 --- a/divelist.c +++ b/divelist.c @@ -413,6 +413,10 @@ static void get_cylinder(struct dive *dive, char **str) 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) @@ -422,10 +426,6 @@ static void fill_one_dive(struct dive *dive, 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, @@ -433,6 +433,7 @@ static void fill_one_dive(struct dive *dive, DIVE_RATING, dive->rating, DIVE_SAC, dive->sac, DIVE_OTU, dive->otu, + DIVE_NITROX, dive->cylinder[0].gasmix.o2, -1); } |