From b934cc156f760b5c43c255d19eaaa533d958c41a Mon Sep 17 00:00:00 2001 From: clifford Date: Sat, 8 May 2010 11:38:30 +0000 Subject: Clifford Wolf: Ask user when reloading with local midifications git-svn-id: http://svn.clifford.at/openscad/trunk@536 b57f626f-c46c-0410-a088-ec61d464b74c 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(); -- cgit v0.10.1