mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Fix up XML saving of remaining bottom time data
While testing the cylinder type saving fix, I noticed that the RBT saving was broken. Instead of saving RBT whenever it changed, we'd save it when it was non-zero. Which doesn't match the git save format, and also doesn't match what we do when loading an xml file (where we default to the previous RBT value, and a sample RBT will modify it). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
c685c05ff4
commit
36121fd8ae
1 changed files with 3 additions and 1 deletions
|
@ -277,8 +277,10 @@ static void save_sample(struct membuffer *b, struct sample *sample, struct sampl
|
|||
put_format(b, " tts='%u:%02u min'", FRACTION(sample->tts.seconds, 60));
|
||||
old->tts = sample->tts;
|
||||
}
|
||||
if (sample->rbt.seconds)
|
||||
if (sample->rbt.seconds != old->rbt.seconds) {
|
||||
put_format(b, " rbt='%u:%02u min'", FRACTION(sample->rbt.seconds, 60));
|
||||
old->rbt = sample->rbt;
|
||||
}
|
||||
if (sample->in_deco != old->in_deco) {
|
||||
put_format(b, " in_deco='%d'", sample->in_deco ? 1 : 0);
|
||||
old->in_deco = sample->in_deco;
|
||||
|
|
Loading…
Add table
Reference in a new issue