summaryrefslogtreecommitdiffstats
path: root/qt-models/diveplannermodel.cpp
diff options
context:
space:
mode:
authorGravatar Jan Darowski <jan.darowski@gmail.com>2015-07-03 23:07:58 +0200
committerGravatar Jan Darowski <jan.darowski@gmail.com>2015-07-03 23:07:58 +0200
commit500fbe499411bfa96192626c8a6213916190aaae (patch)
tree2d10ae563e3f39173a622aa63054512175a7050b /qt-models/diveplannermodel.cpp
parent2435d79c0e6e4e30ace3b23765005c90181ddae5 (diff)
downloadsubsurface-500fbe499411bfa96192626c8a6213916190aaae.tar.gz
VPM-B: add deco choice to the ui.
Removed recreational mode from ui and pref and replaced it with new deco_mode enum. Added radio button ui selection. Set default deco_mode to Buehlmann algorithm. Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r--qt-models/diveplannermodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp
index adbcdba9a..e28b4d146 100644
--- a/qt-models/diveplannermodel.cpp
+++ b/qt-models/diveplannermodel.cpp
@@ -449,10 +449,10 @@ void DivePlannerPointsModel::setDisplayTransitions(bool 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));
}