musredit: improved file system watcher notification mechanism to prevent multiple user notifications.

This commit is contained in:
nemu 2010-10-15 07:36:00 +00:00
parent 99c1e8d17e
commit 3322097fdf
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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();
}
//----------------------------------------------------------------------------------------------------