--- a/src/eric7/QScintilla/Editor.py Tue Jul 16 15:14:23 2024 +0200 +++ b/src/eric7/QScintilla/Editor.py Tue Jul 16 16:08:50 2024 +0200 @@ -329,6 +329,8 @@ # true if we are propagating a lines changed event self.__hasTaskMarkers = False # no task markers present + self.__checkExternalModification = True + # check and reload or warn when modified externally self.macros = {} # list of defined macros self.curMacro = None @@ -8380,13 +8382,22 @@ or self.isReadOnly() ) + def setCheckExternalModificationEnabled(self, enable): + """ + Public method to enable or disable the check for external modifications. + + @param enable flag indicating the new enabled state + @type bool + """ + self.__checkExternalModification = enable + @pyqtSlot() def checkRereadFile(self): """ Public slot to check, if the file needs to be re-read, and refresh it if needed. """ - if self.checkModificationTime(): + if self.__checkExternalModification and self.checkModificationTime(): if Preferences.getEditor("AutoReopen") and not self.isModified(): self.__refresh() else: