diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-02-02 19:43:59 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-02-02 19:43:59 (GMT) |
commit | 18e3a7d9ad8e052d626ac250a9c9d5f36f29a54d (patch) | |
tree | 565c87e051833daa1c0eed7ffe45533fcf05c2fb /src/Preferences.cc | |
parent | 61fffc0e5b92c9bda7e376983fdc90b498eed745 (diff) | |
parent | eb30d42b5dd3ed5bb37336ed46a59eabaca81e06 (diff) |
Merge branch 'master' of github.com:openscad/openscad into misc_updates
Conflicts:
scripts/uni-build-dependencies.sh
Diffstat (limited to 'src/Preferences.cc')
-rw-r--r-- | src/Preferences.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Preferences.cc b/src/Preferences.cc index e70a2a1..ec66094 100644 --- a/src/Preferences.cc +++ b/src/Preferences.cc @@ -30,7 +30,9 @@ #include <QKeyEvent> #include <QSettings> #include "PolySetCache.h" +#ifdef ENABLE_CGAL #include "CGALCache.h" +#endif Preferences *Preferences::instance = NULL; @@ -75,7 +77,9 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent) this->defaultmap["advanced/opencsg_show_warning"] = true; this->defaultmap["advanced/enable_opencsg_opengl1x"] = true; this->defaultmap["advanced/polysetCacheSize"] = uint(PolySetCache::instance()->maxSize()); +#ifdef ENABLE_CGAL this->defaultmap["advanced/cgalCacheSize"] = uint(CGALCache::instance()->maxSize()); +#endif this->defaultmap["advanced/openCSGLimit"] = 2000; this->defaultmap["advanced/forceGoldfeather"] = false; @@ -126,7 +130,9 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent) // Advanced pane QValidator *validator = new QIntValidator(this); +#ifdef ENABLE_CGAL this->cgalCacheSizeEdit->setValidator(validator); +#endif this->polysetCacheSizeEdit->setValidator(validator); this->opencsgLimitEdit->setValidator(validator); @@ -198,7 +204,9 @@ void Preferences::on_cgalCacheSizeEdit_textChanged(const QString &text) { QSettings settings; settings.setValue("advanced/cgalCacheSize", text); +#ifdef ENABLE_CGAL CGALCache::instance()->setMaxSize(text.toULong()); +#endif } void Preferences::on_polysetCacheSizeEdit_textChanged(const QString &text) |