summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/profile.c b/profile.c
index c3b984199..5fa0cb959 100644
--- a/profile.c
+++ b/profile.c
@@ -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 */