diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Preferences.cc | 8 | ||||
-rw-r--r-- | src/mainwin.cc | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Preferences.cc b/src/Preferences.cc index 1f52311..c3d1918 100644 --- a/src/Preferences.cc +++ b/src/Preferences.cc @@ -1,3 +1,5 @@ +#include <iostream> +using namespace std; /* * OpenSCAD (www.openscad.org) * Copyright (C) 2009-2011 Clifford Wolf <clifford@clifford.at> and @@ -47,8 +49,8 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent) // Setup default settings this->defaultmap["3dview/colorscheme"] = this->colorSchemeChooser->currentItem()->text(); - this->defaultmap["editor/fontfamily"] = this->fontChooser->currentText(); - this->defaultmap["editor/fontsize"] = this->fontSize->currentText().toUInt(); + this->defaultmap["editor/fontfamily"] = "Mono"; + this->defaultmap["editor/fontsize"] = 12; this->defaultmap["advanced/opencsg_show_warning"] = true; this->defaultmap["advanced/enable_opencsg_opengl1x"] = true; @@ -212,7 +214,7 @@ void Preferences::updateGUI() if (!found.isEmpty()) this->colorSchemeChooser->setCurrentItem(found.first()); QString fontfamily = getValue("editor/fontfamily").toString(); - int fidx = this->fontChooser->findText(fontfamily); + int fidx = this->fontChooser->findText(fontfamily,Qt::MatchContains); if (fidx >= 0) { this->fontChooser->setCurrentIndex(fidx); } diff --git a/src/mainwin.cc b/src/mainwin.cc index f9029d0..2c52eeb 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -178,7 +178,6 @@ MainWindow::MainWindow(const QString &filename) editor->setTabStopWidth(30); #endif editor->setLineWrapping(true); // Not designable - setFont("", 12); // Init default font this->glview->statusLabel = new QLabel(this); statusBar()->addWidget(this->glview->statusLabel); |