--- a/src/eric7/Project/ProjectBrowserModel.py Fri Jul 12 17:11:28 2024 +0200 +++ b/src/eric7/Project/ProjectBrowserModel.py Fri Jul 12 17:47:25 2024 +0200 @@ -253,6 +253,7 @@ watcher.directoryDeleted.connect(lambda x: self.entryDeleted(x, isDir=True)) watcher.fileCreated.connect(lambda x: self.entryCreated(x, isDir=False)) watcher.fileDeleted.connect(lambda x: self.entryDeleted(x, isDir=False)) + watcher.fileMoved.connect(self.entryMoved) self.inRefresh = False @@ -845,11 +846,25 @@ @type str @param isDir flag indicating a deleted directory (defaults to False) @type bool (optional) + @return flag indicating a deletion + @rtype bool """ if not self.__watcherActive: - return + return False + + return super().entryDeleted(path, isDir=isDir) + + def entryMoved(self, srcPath, tgtPath): + """ + Public slot handling the renaming of a non-managed file. - super().entryDeleted(path, isDir=isDir) + @param srcPath original name + @type str + @param tgtPath new name + @type str + """ + if self.entryDeleted(srcPath, isDir=False): + self.entryCreated(tgtPath, isDir=False) def __addVCSStatus(self, item, name): """