aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/preferences.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-12-18 19:06:51 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-18 13:38:40 -0800
commit77c2c4c5adbc13ac72b5e6c18546187fd43396f2 (patch)
tree58416a545c544fde43ef3c1c9772a06b09c4ba00 /qt-ui/preferences.cpp
parent2f05934936941f4b0229f2bd9822bd9933dea219 (diff)
downloadsubsurface-77c2c4c5adbc13ac72b5e6c18546187fd43396f2.tar.gz
Make default font setting actually work
We were asking the widget.font() which returned the font that the QFontSelector uses to display it's contents, instead of using currentFont() that's the correctly selected font. duh. :)) Fixes #368 Fixes #375 (for #375 the solution is to select a different font that a) looks better and b) has the missing characters) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/preferences.cpp')
-rw-r--r--qt-ui/preferences.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index 91a34a6ba..382880a1f 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -93,7 +93,7 @@ void PreferencesDialog::setUiFromPrefs()
ui.kg->setChecked(prefs.units.weight == units::KG);
ui.lbs->setChecked(prefs.units.weight == units::LBS);
- ui.font->setFont(QString(prefs.divelist_font));
+ ui.font->setCurrentFont(QString(prefs.divelist_font));
ui.fontsize->setValue(prefs.font_size);
ui.defaultfilename->setText(prefs.default_filename);
ui.default_cylinder->clear();
@@ -182,7 +182,7 @@ void PreferencesDialog::syncSettings()
s.endGroup();
s.beginGroup("Display");
- s.setValue("divelist_font", ui.font->font().family());
+ s.setValue("divelist_font", ui.font->currentFont());
s.setValue("font_size", ui.fontsize->value());
s.setValue("displayinvalid", ui.displayinvalid->isChecked());
s.endGroup();