Write depth unit for current dive not previous

The unit was stored to the variable after it was used, thus we need to
delay the print of the unit slightly. (In practice the depth unit for
first picture was null before this fix.)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2015-01-25 16:47:51 +02:00 committed by Dirk Hohndel
parent f70a83667b
commit 6b3e361e90

View file

@ -336,7 +336,8 @@ void DiveLogExportDialog::export_depths(const char *filename, const bool selecte
depth.mm = s->depth.mm;
s++;
}
put_format(&buf, "%s\t%.1f%s\n", picture->filename, get_depth_units(depth.mm, NULL, &unit), unit);
put_format(&buf, "%s\t%.1f", picture->filename, get_depth_units(depth.mm, NULL, &unit));
put_format(&buf, "%s\n", unit);
}
}