Mercurial > hg > octave-terminal
changeset 15446:137de4fbeaf6
Merge in Torsten's changes
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Thu, 27 Sep 2012 09:29:45 -0400 |
parents | 87c3704b5c7a (diff) 46dd555edd33 (current diff) |
children | 352349219529 |
files | |
diffstat | 1 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -145,11 +145,14 @@ void file_editor_tab::set_file_name (const QString& fileName) { - // update tracked file - QStringList trackedFiles = _file_system_watcher.files (); - if (!trackedFiles.isEmpty ()) - _file_system_watcher.removePath (_file_name); - _file_system_watcher.addPath (fileName); + if (fileName != UNNAMED_FILE) + { + // update tracked file if wie really hae a file on disk + QStringList trackedFiles = _file_system_watcher.files (); + if (!trackedFiles.isEmpty ()) + _file_system_watcher.removePath (_file_name); + _file_system_watcher.addPath (fileName); + } _file_name = fileName; // update lexer after _file_name change