diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-07-04 11:44:58 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-04 11:48:02 -0700 |
commit | aafd918169322fc8bc35a750175063b260c55e67 (patch) | |
tree | f3c6f4e71ba66506c959a5f6ffb345e496b454b8 | |
parent | cc86d68c86110bb16b5a75dbd50d35dca39c0719 (diff) | |
download | subsurface-aafd918169322fc8bc35a750175063b260c55e67.tar.gz |
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>
-rw-r--r-- | qt-ui/maintab.cpp | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index e553712e1..5e81272e2 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -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; |