Mercurial > hg > octave-nkf
diff libgui/src/m-editor/file-editor-tab.cc @ 19028:b43157d085ba gui-release
make sure a new and still unnamed file is saved when run from the editor
* file-editor-tab.cc (run_file): save the file before running it when it
is modified or when it does not have a valid file name
author | Torsten <ttl@justmail.de> |
---|---|
date | Mon, 16 Jun 2014 20:41:19 +0200 |
parents | 08d7dbd728bc |
children | 0be65bd7f369 |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -573,7 +573,7 @@ if (ID != this) return; - if (_edit_area->isModified ()) + if (_edit_area->isModified () | ! valid_file_name ()) { _modal_dialog = true; // force modal dialog if the file is a new one save_file (_file_name); // save file dialog