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>
This commit is contained in:
Dirk Hohndel 2014-08-27 06:39:57 -07:00
parent 9aca309611
commit ab4d232bc2

View file

@ -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);