From 3322097fdf9be4656800bff23b4dc66579879f19 Mon Sep 17 00:00:00 2001 From: nemu Date: Fri, 15 Oct 2010 07:36:00 +0000 Subject: [PATCH] musredit: improved file system watcher notification mechanism to prevent multiple user notifications. --- ChangeLog | 1 + src/musredit/PTextEdit.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 32870666..a1ec4934 100644 --- a/ChangeLog +++ b/ChangeLog @@ -48,6 +48,7 @@ FIXED warning messages FIXED db data tag reading error FIXED usage of BOOST >= 1.38.0 FIXED the extraction of the time resolution for the mud data format, since MUD_getHistFsPerBin seems sometimes to return just crap. +CHANGED musredit: improved file system watcher notification mechanism to prevent multiple user notifications. CHANGED fit range decimal precision handling of PMsrHandler improved (MUSR-150 request). It is now handling up to 4 decimal places. CHANGED musredit: now it is keeping the directory from which the last msr-file has been loaded. This directory is diff --git a/src/musredit/PTextEdit.cpp b/src/musredit/PTextEdit.cpp index aac56340..21f247a3 100644 --- a/src/musredit/PTextEdit.cpp +++ b/src/musredit/PTextEdit.cpp @@ -2362,6 +2362,8 @@ void PTextEdit::fileChanged(const QString &fileName) if (!fFileSystemWatcherActive) return; + fFileSystemWatcherActive = false; + QString str = "File '" + fileName + "' changed on the system.\nDo you want to reload it?"; int result = QMessageBox::question(this, "**INFO**", str, QMessageBox::Yes, QMessageBox::No); if (result == QMessageBox::Yes) { @@ -2374,8 +2376,10 @@ void PTextEdit::fileChanged(const QString &fileName) } } - if (idx == -1) + if (idx == -1) { + fileSystemWatcherActivation(); return; + } // remove file from file system watcher fFileSystemWatcher->removePath(fileName); @@ -2385,6 +2389,8 @@ void PTextEdit::fileChanged(const QString &fileName) // load it load(fileName, idx); } + + fileSystemWatcherActivation(); } //----------------------------------------------------------------------------------------------------