mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-20 23:05:27 +00:00
Add dive: don't throw away the pressure data entered
Previously we were trying to get rid of the tracked gas pressures that were added when using the plan infrastructure to create a dive. Now that this isn't the case anymore we can stop doing that which magically makes setting start and end pressure while adding a dive work as expected. Fixes #582 Fixes #553 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
cc86d68c86
commit
aafd918169
1 changed files with 0 additions and 12 deletions
|
@ -749,18 +749,6 @@ void MainTab::acceptChanges()
|
|||
find_new_trip_start_time(current_dive->divetrip);
|
||||
}
|
||||
if (editMode == ADD || editMode == MANUALLY_ADDED_DIVE) {
|
||||
// clean up the dive data (get duration, depth information from samples)
|
||||
// remove the pressures from the samples (as those prevent the user from
|
||||
// being able to manually set the start and end pressure)
|
||||
struct sample *sample = current_dc->sample;
|
||||
for (int i = 0; i < current_dc->samples; i++, sample++)
|
||||
sample->cylinderpressure.mbar = 0;
|
||||
for (int i = 0; i < MAX_CYLINDERS; i++) {
|
||||
cylinder_t *cyl = ¤t_dive->cylinder[i];
|
||||
cyl->start.mbar = cyl->sample_start.mbar;
|
||||
cyl->end.mbar = cyl->sample_end.mbar;
|
||||
cyl->sample_end.mbar = cyl->sample_start.mbar = 0;
|
||||
}
|
||||
fixup_dive(current_dive);
|
||||
if (dive_table.nr == 1)
|
||||
current_dive->number = 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue