mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Only calculate decompression if the user turned the preference on
There's no point in wasting the cycles otherwise. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7861103139
commit
640f2067d5
1 changed files with 5 additions and 2 deletions
|
@ -1086,7 +1086,8 @@ struct plot_info *create_plot_info(struct dive *dive, struct divecomputer *dc, s
|
|||
pi = &gc->pi;
|
||||
|
||||
/* reset deco information to start the calculation */
|
||||
init_decompression(dive);
|
||||
if (prefs.profile_calc_ceiling)
|
||||
init_decompression(dive);
|
||||
|
||||
/* Create the new plot data */
|
||||
if (last_pi_entry)
|
||||
|
@ -1103,7 +1104,9 @@ struct plot_info *create_plot_info(struct dive *dive, struct divecomputer *dc, s
|
|||
populate_pressure_information(dive, dc, pi);
|
||||
|
||||
/* Then, calculate partial pressures and deco information */
|
||||
calculate_deco_information(dive, dc, pi);
|
||||
if (prefs.profile_calc_ceiling)
|
||||
calculate_deco_information(dive, dc, pi);
|
||||
|
||||
pi->meandepth = dive->dc.meandepth.mm;
|
||||
|
||||
if (0) /* awesome for debugging - not useful otherwise */
|
||||
|
|
Loading…
Add table
Reference in a new issue