fix: project's unit file not correctly add to watch after renamed
This commit is contained in:
parent
e60b909294
commit
a2e514e98a
|
@ -3143,7 +3143,7 @@ void MainWindow::onFileChanged(const QString &path)
|
|||
if (e) {
|
||||
if (fileExists(path)) {
|
||||
e->activate();
|
||||
if (QMessageBox::question(this,tr("Compile"),
|
||||
if (QMessageBox::question(this,tr("File Changed"),
|
||||
tr("File '%1' was changed.").arg(path)+"<BR /><BR />" + tr("Reload its content from disk?"),
|
||||
QMessageBox::Yes|QMessageBox::No,
|
||||
QMessageBox::No) == QMessageBox::Yes) {
|
||||
|
@ -3154,7 +3154,7 @@ void MainWindow::onFileChanged(const QString &path)
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (QMessageBox::question(this,tr("Compile"),
|
||||
if (QMessageBox::question(this,tr("File Changed"),
|
||||
tr("File '%1' was removed.").arg(path)+"<BR /><BR />" + tr("Keep it open?"),
|
||||
QMessageBox::Yes|QMessageBox::No,
|
||||
QMessageBox::Yes) == QMessageBox::No) {
|
||||
|
|
|
@ -1969,7 +1969,7 @@ bool ProjectModel::setData(const QModelIndex &index, const QVariant &value, int
|
|||
}
|
||||
|
||||
// Add new filename to file minitor
|
||||
pMainWindow->fileSystemWatcher()->removePath(oldName);
|
||||
pMainWindow->fileSystemWatcher()->addPath(newName);
|
||||
return true;
|
||||
} else {
|
||||
//change folder name
|
||||
|
|
Loading…
Reference in New Issue