summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Patrick Valsecchi <patrick@thus.ch>2013-11-20 16:11:22 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-21 08:11:40 -0800
commitfe2eabf3756c9883ee8e8c145e5cd12d8d336933 (patch)
tree2cde71531d087a96fa91ba1dc47d07f42ae98faa /qt-ui/mainwindow.cpp
parent4c4a7a6d968fa27de72f1510c55d327a7e919d7c (diff)
downloadsubsurface-fe2eabf3756c9883ee8e8c145e5cd12d8d336933.tar.gz
Added a configuration option to have gf_low apply at max depth instead of at deepest ceiling.
Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 23c972741..1f3d7def9 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -564,6 +564,13 @@ bool MainWindow::askSaveChanges()
else \
prefs.field = default_prefs.field
+#define GET_TXT(name, field) \
+ v = s.value(QString(name)); \
+ if (v.isValid()) \
+ prefs.field = strdup(v.toString().toUtf8().constData()); \
+ else \
+ prefs.field = default_prefs.field
+
void MainWindow::initialUiSetup()
{
@@ -623,7 +630,8 @@ void MainWindow::readSettings()
GET_BOOL("calcalltissues", calc_all_tissues);
GET_INT("gflow", gflow);
GET_INT("gfhigh", gfhigh);
- set_gf(prefs.gflow, prefs.gfhigh);
+ GET_BOOL("gf_low_at_maxdepth", gf_low_at_maxdepth);
+ set_gf(prefs.gflow, prefs.gfhigh, prefs.gf_low_at_maxdepth);
GET_BOOL("show_sac", show_sac);
s.endGroup();