summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2010-05-08 11:38:30 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2010-05-08 11:38:30 (GMT)
commitb934cc156f760b5c43c255d19eaaa533d958c41a (patch)
treedf9345fbbfc01933bed56eb625594354ca04e479 /src
parentf3de61c992a959fea913311c727c3f6a79c5d0a5 (diff)
Clifford Wolf:
Ask user when reloading with local midifications git-svn-id: http://svn.clifford.at/openscad/trunk@536 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'src')
-rw-r--r--src/mainwin.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainwin.cc b/src/mainwin.cc
index 4d7ed00..72b3d7a 100644
--- a/src/mainwin.cc
+++ b/src/mainwin.cc
@@ -961,6 +961,17 @@ void MainWindow::pasteViewportRotation()
void MainWindow::actionReloadCompile()
{
+ if (editor->isContentModified()) {
+ QMessageBox::StandardButton ret;
+ ret = QMessageBox::warning(this, "Application",
+ "The document has been modified.\n"
+ "Do you really want to reload the file?",
+ QMessageBox::Yes | QMessageBox::No);
+ if (ret != QMessageBox::Yes) {
+ return;
+ }
+ }
+
console->clear();
load();
contact: Jan Huwald // Impressum