From e305954e271892b593e1aa1a5eb0f43c1c10609e Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 25 Jan 2012 17:04:07 +0100 Subject: Fixed recently introduced crash bug when using the % and # operator, reported by Triffid Hunter diff --git a/src/mainwin.cc b/src/mainwin.cc index ff6ce3e..c0a0bff 100644 --- a/src/mainwin.cc +++ b/src/mainwin.cc @@ -788,7 +788,7 @@ void MainWindow::compileCSG(bool procevents) if (highlight_terms.size() > 0) { - PRINTB("Compiling highlights (%zu CSG Trees)...", highlight_terms.size()); + PRINTB("Compiling highlights (%d CSG Trees)...", highlight_terms.size()); if (procevents) QApplication::processEvents(); @@ -801,7 +801,7 @@ void MainWindow::compileCSG(bool procevents) if (background_terms.size() > 0) { - PRINTB("Compiling background (%zu CSG Trees)...", background_terms.size()); + PRINTB("Compiling background (%d CSG Trees)...", background_terms.size()); if (procevents) QApplication::processEvents(); -- cgit v0.10.1 From d8ee4bdb2ffea5caf2925582bea901aca2746342 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 25 Jan 2012 17:19:09 +0100 Subject: bugfix: Saved fontsize wasn't actually being used diff --git a/src/Preferences.cc b/src/Preferences.cc index 9e1e1f1..10ed44d 100644 --- a/src/Preferences.cc +++ b/src/Preferences.cc @@ -55,14 +55,18 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent) this->defaultmap["editor/fontfamily"] = found_family; this->defaultmap["editor/fontsize"] = 12; + uint savedsize = getValue("editor/fontsize").toUInt(); QFontDatabase db; foreach(int size, db.standardSizes()) { this->fontSize->addItem(QString::number(size)); - if (size == 12) { + if (size == savedsize) { this->fontSize->setCurrentIndex(this->fontSize->count()-1); } } + connect(this->fontSize, SIGNAL(currentIndexChanged(const QString&)), + this, SLOT(on_fontSize_editTextChanged(const QString &))); + // Setup default settings this->defaultmap["3dview/colorscheme"] = this->colorSchemeChooser->currentItem()->text(); this->defaultmap["advanced/opencsg_show_warning"] = true; -- cgit v0.10.1