diff options
author | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-08-20 22:30:06 +0200 |
---|---|---|
committer | Pavel Pisa <pisa@cmp.felk.cvut.cz> | 2019-08-20 22:30:06 +0200 |
commit | e7dbc15332dca8d3c2c233258f73694215e703b8 (patch) | |
tree | 199ceb7c599ed48ed19f5747be2f0fbda2567f2c /qtmips_gui | |
parent | 758af92799656991c5e5b8d8a72381fb5cd6170f (diff) | |
download | qtmips-e7dbc15332dca8d3c2c233258f73694215e703b8.tar.gz qtmips-e7dbc15332dca8d3c2c233258f73694215e703b8.tar.bz2 qtmips-e7dbc15332dca8d3c2c233258f73694215e703b8.zip |
Attempt to correct ask for file save when closed on emscripten.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_gui')
-rw-r--r-- | qtmips_gui/mainwindow.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qtmips_gui/mainwindow.cpp b/qtmips_gui/mainwindow.cpp index e84359f..084b063 100644 --- a/qtmips_gui/mainwindow.cpp +++ b/qtmips_gui/mainwindow.cpp @@ -469,7 +469,13 @@ void MainWindow::save_exit_or_ignore(bool cancel, QStringList &tosavelist) { if (editor->saveAsRequired()) { save_unnamed = true; } else if (editor != nullptr) { +#ifndef __EMSCRIPTEN__ editor->saveFile(); +#else + central_window->setCurrentWidget(editor); + save_source(); + return; +#endif } } if (save_unnamed && (central_window != nullptr)) { @@ -795,6 +801,7 @@ void MainWindow::close_source_decided(int result) { save_source_as(); return; } + save_source(); } else if (result != QMessageBox::Discard) { return; } |