summaryrefslogtreecommitdiff
path: root/src/mainwin.cc
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-06-12 23:30:42 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-06-12 23:30:42 (GMT)
commitdfe808e7d4329dc96e9fa99d7e2561af2180b4ab (patch)
tree79d24bec312bae2fd55e4cafa343c4ca735c0225 /src/mainwin.cc
parentfb0f3ed8d13ce5c934d3c201eb56e019b3470baf (diff)
fixed check-before-reload, also for the Reload (F3) function
git-svn-id: http://svn.clifford.at/openscad/trunk@556 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r--src/mainwin.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index cdd7c6f..f6b7a53 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -932,7 +932,7 @@ void MainWindow::actionSaveAs()
void MainWindow::actionReload()
{
- load();
+ if (checkModified()) load();
}
void MainWindow::hideEditor()
@@ -991,7 +991,7 @@ void MainWindow::autoReloadSet(bool on)
}
}
-void MainWindow::actionReloadCompile()
+bool MainWindow::checkModified()
{
if (editor->isContentModified()) {
QMessageBox::StandardButton ret;
@@ -1001,9 +1001,15 @@ void MainWindow::actionReloadCompile()
QMessageBox::Yes | QMessageBox::No);
if (ret != QMessageBox::Yes) {
designActionAutoReload->setChecked(false);
- return;
+ return false;
}
}
+ return true;
+}
+
+void MainWindow::actionReloadCompile()
+{
+ if (!checkModified()) return;
console->clear();
contact: Jan Huwald // Impressum