mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
b8347d2387
commit
5f5e52fb46
1 changed files with 2 additions and 2 deletions
|
@ -1049,7 +1049,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
|
||||||
if (decoMode() == VPMB && !in_planner() && i == pi->nr - 1)
|
if (decoMode() == VPMB && !in_planner() && i == pi->nr - 1)
|
||||||
final_tts = entry->tts_calc;
|
final_tts = entry->tts_calc;
|
||||||
/* Restore "real" deco state for next real time step */
|
/* 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);
|
free(cache_data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1066,7 +1066,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
|
||||||
first_ceiling = 0;
|
first_ceiling = 0;
|
||||||
first_iteration = false;
|
first_iteration = false;
|
||||||
count_iteration ++;
|
count_iteration ++;
|
||||||
restore_deco_state(cache_data_initial, false);
|
restore_deco_state(cache_data_initial, true);
|
||||||
} else {
|
} else {
|
||||||
// With Buhlmann, or not in planner, iterating isn't needed. This makes the while condition false.
|
// With Buhlmann, or not in planner, iterating isn't needed. This makes the while condition false.
|
||||||
prev_deco_time = deco_time = 0;
|
prev_deco_time = deco_time = 0;
|
||||||
|
|
Loading…
Reference in a new issue