mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Bugfix in plannermodel for very short dive durations
When adding a dive manually, you might clear the "duration" field and fill in your value by hand. Unfortunately, commit #1052 produced a bug that practically limited the dive duration to 6 minutes once the field was cleared. Signed-off-by: Oliver Schwaneberg <oliver.schwaneberg@gmail.com>
This commit is contained in:
parent
f762367d53
commit
218ea94831
2 changed files with 2 additions and 1 deletions
|
@ -1,3 +1,4 @@
|
|||
- Fix bug that alters manually entered dive durations
|
||||
- Desktop: don't ignore seconds in duration input field
|
||||
- Libdivecomputer: use a new version
|
||||
- Dekstop: fix instability crashes in reverse geo lookup function
|
||||
|
|
|
@ -108,7 +108,7 @@ void DivePlannerPointsModel::loadFromDive(dive *d)
|
|||
int cylinderid = 0;
|
||||
last_sp.mbar = 0;
|
||||
for (int i = 0; i < plansamples - 1; i++) {
|
||||
if (dc->last_manual_time.seconds && lasttime.seconds >= dc->last_manual_time.seconds)
|
||||
if (dc->last_manual_time.seconds && dc->last_manual_time.seconds > 120 && lasttime.seconds >= dc->last_manual_time.seconds)
|
||||
break;
|
||||
while (j * plansamples <= i * dc->samples) {
|
||||
const sample &s = dc->sample[j];
|
||||
|
|
Loading…
Add table
Reference in a new issue