summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2013-05-27 05:08:31 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2013-05-27 05:08:31 (GMT)
commit37dc9342a14206f5862447eb9d3d5049ec67f638 (patch)
tree17e5a57dfa154821918094cab47476189771ce00 /src/mainwin.cc
parent6742ad55f4cf335fc767ab65784aab81e06b61d0 (diff)
parent0967a26bff45951d7b86fe628e8b1156e6e40ede (diff)
Merge branch 'master' of github.com:openscad/openscad into issue125
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index 39af31c..08f0435 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -775,14 +775,14 @@ void MainWindow::compileCSG(bool procevents)
}
if (this->root_chain &&
- (this->root_chain->polysets.size() >
+ (this->root_chain->objects.size() >
Preferences::inst()->getValue("advanced/openCSGLimit").toUInt())) {
- PRINTB("WARNING: Normalized tree has %d elements!", this->root_chain->polysets.size());
+ PRINTB("WARNING: Normalized tree has %d elements!", this->root_chain->objects.size());
PRINT("WARNING: OpenCSG rendering has been disabled.");
}
else {
PRINTB("Normalized CSG tree has %d elements",
- (this->root_chain ? this->root_chain->polysets.size() : 0));
+ (this->root_chain ? this->root_chain->objects.size() : 0));
this->opencsgRenderer = new OpenCSGRenderer(this->root_chain,
this->highlights_chain,
this->background_chain,
@@ -1036,20 +1036,11 @@ bool MainWindow::fileChangedOnDisk()
return false;
}
-// FIXME: The following two methods are duplicated in ModuleCache.cc - refactor
-static bool is_modified(const std::string &filename, const time_t &mtime)
-{
- struct stat st;
- memset(&st, 0, sizeof(struct stat));
- stat(filename.c_str(), &st);
- return (st.st_mtime > mtime);
-}
-
bool MainWindow::includesChanged()
{
if (this->root_module) {
BOOST_FOREACH(const FileModule::IncludeContainer::value_type &item, this->root_module->includes) {
- if (is_modified(item.first, item.second)) return true;
+ if (this->root_module->include_modified(item.second)) return true;
}
}
return false;
contact: Jan Huwald // Impressum