diff options
author | Marius Kintel <marius@kintel.net> | 2013-01-30 16:58:19 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-01-30 16:58:19 (GMT) |
commit | 6f205814bc516ba71b7b02185986206d099ac000 (patch) | |
tree | 94058413e89665b875786d5b6c03db24b9b4535b /src/Preferences.cc | |
parent | b0acc7598068f946696369de1355714a5bdf14da (diff) |
Make it possible to build without CGAL. Fixes #264
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) |