diff options
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 11 | ||||
-rw-r--r-- | qt-models/diveplannermodel.h | 2 |
2 files changed, 4 insertions, 9 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index adbcdba9a..439e7a4de 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -416,43 +416,38 @@ int DivePlannerPointsModel::getSurfacePressure() void DivePlannerPointsModel::setLastStop6m(bool value) { - set_last_stop(value); prefs.last_stop = value; emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); } void DivePlannerPointsModel::setVerbatim(bool value) { - set_verbatim(value); prefs.verbatim_plan = value; emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); } void DivePlannerPointsModel::setDisplayRuntime(bool value) { - set_display_runtime(value); prefs.display_runtime = value; emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); } void DivePlannerPointsModel::setDisplayDuration(bool value) { - set_display_duration(value); prefs.display_duration = value; emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); } void DivePlannerPointsModel::setDisplayTransitions(bool value) { - set_display_transitions(value); prefs.display_transitions = value; emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); } -void DivePlannerPointsModel::setRecreationalMode(bool value) +void DivePlannerPointsModel::setDecoMode(int mode) { - prefs.recreational_mode = value; - emit recreationChanged(value); + prefs.deco_mode = deco_mode(mode); + emit recreationChanged(mode == int(RECREATIONAL)); emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS -1)); } diff --git a/qt-models/diveplannermodel.h b/qt-models/diveplannermodel.h index 422499084..a8524393a 100644 --- a/qt-models/diveplannermodel.h +++ b/qt-models/diveplannermodel.h @@ -78,7 +78,7 @@ slots: void setDisplayRuntime(bool value); void setDisplayDuration(bool value); void setDisplayTransitions(bool value); - void setRecreationalMode(bool value); + void setDecoMode(int mode); void setSafetyStop(bool value); void savePlan(); void saveDuplicatePlan(); |