aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlinterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mobile-widgets/qmlinterface.cpp')
-rw-r--r--mobile-widgets/qmlinterface.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/mobile-widgets/qmlinterface.cpp b/mobile-widgets/qmlinterface.cpp
index df3af0b5f..f666d2dc0 100644
--- a/mobile-widgets/qmlinterface.cpp
+++ b/mobile-widgets/qmlinterface.cpp
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#include "qmlinterface.h"
-
#include <QQmlEngine>
QMLInterface *QMLInterface::instance()
@@ -92,4 +91,15 @@ void QMLInterface::setup(QQmlContext *ct)
instance(), &QMLInterface::verbatim_planChanged);
connect(qPrefDivePlanner::instance(), &qPrefDivePlanner::display_variationsChanged,
instance(), &QMLInterface::display_variationsChanged);
+
+ // calculate divesummary first time.
+ // this is needed in order to load the divesummary page
+ diveSummary::summaryCalculation(0, 3);
+}
+
+
+void QMLInterface::summaryCalculation(int primaryPeriod, int secondaryPeriod)
+{
+ diveSummary::summaryCalculation(primaryPeriod, secondaryPeriod);
+ emit diveSummaryTextChanged(diveSummary::diveSummaryText);
}