summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-07 22:09:15 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-10-07 22:09:15 +0100
commit09d6913161c6df29bed02805a905f5dc9c6824d7 (patch)
tree1bc4578c1bd686830e667b2c31c72ed2c8bdf921
parentea6f6b959e6cd38b82da48bfd17bd62198f79133 (diff)
downloadsubsurface-09d6913161c6df29bed02805a905f5dc9c6824d7.tar.gz
export-html needs to actually calculate the statistics
Otherwise they will always be empty. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--export-html.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/export-html.cpp b/export-html.cpp
index 4311d5eb4..0c270c6fc 100644
--- a/export-html.cpp
+++ b/export-html.cpp
@@ -12,6 +12,7 @@
#include "subsurfacestartup.h"
#include "divelogexportlogic.h"
#include "windowtitleupdate.h"
+#include "statistics.h"
QTranslator *qtTranslator, *ssrfTranslator;
@@ -54,6 +55,13 @@ int main(int argc, char **argv)
prefs.unit_system = informational_prefs.unit_system;
prefs.units = informational_prefs.units;
+ // populate the statistics
+ struct dive *d = get_dive(0);
+ struct dive *pd;
+ if (d) {
+ process_all_dives(d, &pd);
+ }
+
// now set up the export settings to create the HTML export
struct htmlExportSetting hes;
hes.themeFile = "sand.css";