From ab4d232bc22d04dbc6575dfe1e312f0eb31e7df9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 27 Aug 2014 06:39:57 -0700 Subject: 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 --- qt-ui/mainwindow.cpp | 8 ++------ 1 file 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(); - 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); -- cgit v1.2.3-70-g09d2