export-html needs to actually calculate the statistics

Otherwise they will always be empty.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-10-07 22:09:15 +01:00
parent ea6f6b959e
commit 09d6913161

View file

@ -12,6 +12,7 @@
#include "subsurfacestartup.h" #include "subsurfacestartup.h"
#include "divelogexportlogic.h" #include "divelogexportlogic.h"
#include "windowtitleupdate.h" #include "windowtitleupdate.h"
#include "statistics.h"
QTranslator *qtTranslator, *ssrfTranslator; QTranslator *qtTranslator, *ssrfTranslator;
@ -54,6 +55,13 @@ int main(int argc, char **argv)
prefs.unit_system = informational_prefs.unit_system; prefs.unit_system = informational_prefs.unit_system;
prefs.units = informational_prefs.units; 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 // now set up the export settings to create the HTML export
struct htmlExportSetting hes; struct htmlExportSetting hes;
hes.themeFile = "sand.css"; hes.themeFile = "sand.css";