mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
ae56119a9a
commit
92446f0009
1 changed files with 2 additions and 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);
|
||||
|
|
Loading…
Add table
Reference in a new issue