mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
profile: fix editing depth / duration
The undo commands for depth and duration editing cleared the samples of the dive computer. They relied on the profile automatically creating a fake profile. However, at some point that code got removed. Therefore, do it explicitly in the undo command. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1e527fb9f0
commit
cbe6d89767
2 changed files with 3 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
Profile: Fix editing of time / duration (profile of edited dive was not shown)
|
||||
Divelist: Don't attempt to compute SAC for CCR dives
|
||||
---
|
||||
* Always add new entries at the very top of this file above other existing entries and this note.
|
||||
|
|
|
@ -306,6 +306,7 @@ void EditDuration::set(struct dive *d, int value) const
|
|||
d->duration = d->dc.duration;
|
||||
d->dc.meandepth.mm = 0;
|
||||
d->dc.samples = 0;
|
||||
fake_dc(&d->dc);
|
||||
}
|
||||
|
||||
int EditDuration::data(struct dive *d) const
|
||||
|
@ -325,6 +326,7 @@ void EditDepth::set(struct dive *d, int value) const
|
|||
d->maxdepth = d->dc.maxdepth;
|
||||
d->dc.meandepth.mm = 0;
|
||||
d->dc.samples = 0;
|
||||
fake_dc(&d->dc);
|
||||
}
|
||||
|
||||
int EditDepth::data(struct dive *d) const
|
||||
|
|
Loading…
Reference in a new issue