From 92446f0009542c7d2fbe2896ccf9aa3cb50ee415 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Tue, 28 Jan 2014 21:11:14 -0200 Subject: Always calculate deco data, independent of preferences This is a better way since we can enable / disable the deco by changing the preferences later, and that will not need to recalculate everything just because a polygon was set to invisible. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- profile.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'profile.c') diff --git a/profile.c b/profile.c index 82aa274f2..66e7a1357 100644 --- a/profile.c +++ b/profile.c @@ -1355,8 +1355,7 @@ struct plot_info *create_plot_info(struct dive *dive, struct divecomputer *dc, s void create_plot_info_new(struct dive *dive, struct divecomputer *dc, struct plot_info *pi) { - if (prefs.profile_calc_ceiling) /* reset deco information to start the calculation */ - init_decompression(dive); + init_decompression(dive); if (last_pi_entry) /* Create the new plot data */ free((void *)last_pi_entry); last_pi_entry = populate_plot_entries(dive, dc, pi); @@ -1364,8 +1363,7 @@ void create_plot_info_new(struct dive *dive, struct divecomputer *dc, struct plo setup_gas_sensor_pressure(dive, dc, pi); /* Try to populate our gas pressure knowledge */ populate_pressure_information(dive, dc, pi);/* .. calculate missing pressure entries */ calculate_sac(dive, pi); /* Calculate sac */ - if (prefs.profile_calc_ceiling) /* Then, calculate deco information */ - calculate_deco_information(dive, dc, pi, false); + calculate_deco_information(dive, dc, pi, false); calculate_gas_information_new(dive, pi); /* And finaly calculate gas partial pressures */ pi->meandepth = dive->dc.meandepth.mm; analyze_plot_info(pi); -- cgit v1.2.3-70-g09d2