summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-03-12 01:05:53 (GMT)
committerMarius Kintel <marius@kintel.net>2013-03-12 01:05:53 (GMT)
commit9899f75a257c791c4272b60aa0c96e46f9acb16b (patch)
tree258e0205fd592e03bb6e00278b9dc30e3b6291b6
parent4b7fe104f0fc9fb5fa06f6e29a75bfdae80cfd6c (diff)
Fixes problem where local changes are overwritten on automatic reload when included files has changed. Fixes #162
-rw-r--r--RELEASE_NOTES1
-rw-r--r--src/mainwin.cc5
2 files changed, 4 insertions, 2 deletions
diff --git a/RELEASE_NOTES b/RELEASE_NOTES
index d18ae5e..9e2da81 100644
--- a/RELEASE_NOTES
+++ b/RELEASE_NOTES
@@ -19,6 +19,7 @@ o Fixed some issues related to ARM builds
o Changed multmatrix floating-point output to improve dumptest portability
o Regression test auto-starts & stops Xvfb / Xvnc if on headless unix machine
o CGAL triangulation more lenient- enables partial rendering of 'bad' DXF data
+o Fixes problem where local changes are overwritten on automatic reload when included files has changed.
OpenSCAD 2013.01
================
diff --git a/src/mainwin.cc b/src/mainwin.cc
index c82e949..9cb59dd 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -1040,8 +1040,9 @@ bool MainWindow::compileTopLevelDocument(bool reload)
{
bool shouldcompiletoplevel = !reload;
- if ((reload && fileChangedOnDisk() && checkEditorModified()) ||
- includesChanged()) {
+ if (includesChanged()) shouldcompiletoplevel = true;
+
+ if (reload && fileChangedOnDisk() && checkEditorModified()) {
shouldcompiletoplevel = true;
refreshDocument();
}
contact: Jan Huwald // Impressum