src/eric7/QScintilla/Editor.py

branch
eric7
changeset 10850
d835f48b9908
parent 10849
78d338b6d89f
child 10873
4e8e63df7893
child 10878
c9f329692cf0
--- 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:

eric ide

mercurial