diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-06-19 21:13:27 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-06-22 10:39:37 +0900 |
commit | 5f5e52fb46d226fb6a38343276db4c542e2be2d1 (patch) | |
tree | 24e911f52846201110dbbc08eb73038f51ebddf4 /core/profile.c | |
parent | b8347d2387bda0707e63a936bd8f16105b826ecc (diff) | |
download | subsurface-5f5e52fb46d226fb6a38343276db4c542e2be2d1.tar.gz |
Preserve VPM-B state in profile display
This fixes a but reported by Willem in the display of VPMB
ceilings for logged dives.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/profile.c')
-rw-r--r-- | core/profile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/profile.c b/core/profile.c index 26098b210..6923d4dd1 100644 --- a/core/profile.c +++ b/core/profile.c @@ -1049,7 +1049,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru if (decoMode() == VPMB && !in_planner() && i == pi->nr - 1) final_tts = entry->tts_calc; /* Restore "real" deco state for next real time step */ - restore_deco_state(cache_data, false); + restore_deco_state(cache_data, decoMode() == VPMB); free(cache_data); } } @@ -1066,7 +1066,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru first_ceiling = 0; first_iteration = false; count_iteration ++; - restore_deco_state(cache_data_initial, false); + restore_deco_state(cache_data_initial, true); } else { // With Buhlmann, or not in planner, iterating isn't needed. This makes the while condition false. prev_deco_time = deco_time = 0; |