Mercurial > hg > octave-lojdl
changeset 15849:e55a64f49346
editor: prevent reloaded file from being added twice to the file watcher
file-edtior-tab.cc: only readd an externally changed file to the file watcher in
handle_file_reload_answer () when it is not reloaded; if reloaded, it is readded
in set_system_file ()
author | Torsten <ttl@justmail.de> |
---|---|
date | Tue, 25 Dec 2012 22:15:02 +0100 |
parents | 424edeca3c66 |
children | ffd1a99733bd |
files | libgui/src/m-editor/file-editor-tab.cc |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc +++ b/libgui/src/m-editor/file-editor-tab.cc @@ -1056,12 +1056,13 @@ file_editor_tab::handle_file_reload_answer (int decision) { if (decision == QMessageBox::Yes) - { + { // reload: file is readded to the file watcher in set_file_name () load_file (_file_name); } - - // Start watching file once again. - _file_system_watcher.addPath (_file_name); + else + { // do not reload: readd to the file watche + _file_system_watcher.addPath (_file_name); + } } void