changeset 18872: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 41980d0a5fd2
files libgui/src/m-editor/file-editor-tab.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Mon Jun 16 20:30:28 2014 +0200
+++ b/libgui/src/m-editor/file-editor-tab.cc	Mon Jun 16 20:41:19 2014 +0200
@@ -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