aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-27 06:39:57 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-27 15:46:06 -0700
commitab4d232bc22d04dbc6575dfe1e312f0eb31e7df9 (patch)
tree6e46c97228475236e874f5038fa62600607f091f /qt-ui/mainwindow.cpp
parent9aca3096119a35fe3ae7dff4a8ef55f4dac5d7ef (diff)
downloadsubsurface-ab4d232bc22d04dbc6575dfe1e312f0eb31e7df9.tar.gz
Don't set up fonts twice
Turns out that the mainwindow reads the settings and sets up things - except that this has already happened in the constructor of the static PreferencesDialog. So only keep those parts that aren't handled there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index c0c76a6f5..6e3aeec80 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -794,12 +794,8 @@ void MainWindow::readSettings()
{
static bool firstRun = true;
QSettings s;
- s.beginGroup("Display");
- QFont defaultFont = QFont(default_prefs.divelist_font);
- defaultFont = s.value("divelist_font", defaultFont).value<QFont>();
- defaultFont.setPointSizeF(s.value("font_size", default_prefs.font_size).toFloat());
- qApp->setFont(defaultFont);
- s.endGroup();
+ // the static object for preferences already reads in the settings
+ // and sets up the font, so just get what we need for the toolbox and other widgets here
s.beginGroup("TecDetails");
TOOLBOX_PREF_BUTTON(calcalltissues, calcalltissues, profCalcAllTissues);