summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-01-25 16:47:51 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-25 07:18:35 -0800
commit6b3e361e904cd7e7f5b4be025cede2db2d2a12ce (patch)
tree1e276c8cfe7e925abcca21bd3aabc4800ec650c7
parentf70a83667b6e7f2e7cebcc010d526ee0dd1b3512 (diff)
downloadsubsurface-6b3e361e904cd7e7f5b4be025cede2db2d2a12ce.tar.gz
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>
-rw-r--r--qt-ui/divelogexportdialog.cpp3
1 files changed, 2 insertions, 1 deletions
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);
}
}