summaryrefslogtreecommitdiffstats
path: root/qt-mobile/qmlmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-mobile/qmlmanager.cpp')
-rw-r--r--qt-mobile/qmlmanager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index cd45d304a..422a77e06 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -353,7 +353,7 @@ void QMLManager::refreshDiveList()
// update the dive and return the notes field, stripped of the HTML junk
QString QMLManager::commitChanges(QString diveId, QString date, QString location, QString gps, QString duration, QString depth,
QString airtemp, QString watertemp, QString suit, QString buddy, QString diveMaster, QString weight, QString notes,
- QString startpressure, QString endpressure)
+ QString startpressure, QString endpressure, QString gasmix)
{
#define DROP_EMPTY_PLACEHOLDER(_s) if ((_s) == QLatin1Literal("--")) (_s).clear()
@@ -366,6 +366,7 @@ QString QMLManager::commitChanges(QString diveId, QString date, QString location
DROP_EMPTY_PLACEHOLDER(buddy);
DROP_EMPTY_PLACEHOLDER(diveMaster);
DROP_EMPTY_PLACEHOLDER(weight);
+ DROP_EMPTY_PLACEHOLDER(gasmix);
DROP_EMPTY_PLACEHOLDER(startpressure);
DROP_EMPTY_PLACEHOLDER(endpressure);
DROP_EMPTY_PLACEHOLDER(notes);
@@ -514,6 +515,12 @@ QString QMLManager::commitChanges(QString diveId, QString date, QString location
d->cylinder[0].start.mbar = parsePressureToMbar(startpressure);
d->cylinder[0].end.mbar = parsePressureToMbar(endpressure);
}
+ // gasmix for first cylinder
+ if (get_gas_string(d->cylinder[0].gasmix) != gasmix) {
+ diveChanged = true;
+ d->cylinder[0].gasmix.o2.permille = parseGasMixO2(gasmix);
+ d->cylinder[0].gasmix.he.permille = parseGasMixHE(gasmix);
+ }
if (!same_string(d->suit, qPrintable(suit))) {
diveChanged = true;
free(d->suit);