diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2014-01-28 21:11:14 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-29 09:33:45 -0800 |
commit | 92446f0009542c7d2fbe2896ccf9aa3cb50ee415 (patch) | |
tree | 1848878a0a016825b2d3d2128d9709cd64b2124e /profile.c | |
parent | ae56119a9a617fd4e0f940cf31de6a2cc6f7cda0 (diff) | |
download | subsurface-92446f0009542c7d2fbe2896ccf9aa3cb50ee415.tar.gz |
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 <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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); |