diff options
Diffstat (limited to 'src/mainwin.cc')
-rw-r--r-- | src/mainwin.cc | 11 |
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(); |