From 6b3e361e904cd7e7f5b4be025cede2db2d2a12ce Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sun, 25 Jan 2015 16:47:51 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/divelogexportdialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/divelogexportdialog.cpp b/qt-ui/divelogexportdialog.cpp index a747932ac..cb7d6a02e 100644 --- a/qt-ui/divelogexportdialog.cpp +++ b/qt-ui/divelogexportdialog.cpp @@ -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); } } -- cgit v1.2.3-70-g09d2