327 # true if we are in drop mode |
327 # true if we are in drop mode |
328 self.inLinesChanged = False |
328 self.inLinesChanged = False |
329 # true if we are propagating a lines changed event |
329 # true if we are propagating a lines changed event |
330 self.__hasTaskMarkers = False |
330 self.__hasTaskMarkers = False |
331 # no task markers present |
331 # no task markers present |
|
332 self.__checkExternalModification = True |
|
333 # check and reload or warn when modified externally |
332 |
334 |
333 self.macros = {} # list of defined macros |
335 self.macros = {} # list of defined macros |
334 self.curMacro = None |
336 self.curMacro = None |
335 self.recording = False |
337 self.recording = False |
336 |
338 |
8378 ) |
8380 ) |
8379 ) |
8381 ) |
8380 or self.isReadOnly() |
8382 or self.isReadOnly() |
8381 ) |
8383 ) |
8382 |
8384 |
|
8385 def setCheckExternalModificationEnabled(self, enable): |
|
8386 """ |
|
8387 Public method to enable or disable the check for external modifications. |
|
8388 |
|
8389 @param enable flag indicating the new enabled state |
|
8390 @type bool |
|
8391 """ |
|
8392 self.__checkExternalModification = enable |
|
8393 |
8383 @pyqtSlot() |
8394 @pyqtSlot() |
8384 def checkRereadFile(self): |
8395 def checkRereadFile(self): |
8385 """ |
8396 """ |
8386 Public slot to check, if the file needs to be re-read, and refresh it if |
8397 Public slot to check, if the file needs to be re-read, and refresh it if |
8387 needed. |
8398 needed. |
8388 """ |
8399 """ |
8389 if self.checkModificationTime(): |
8400 if self.__checkExternalModification and self.checkModificationTime(): |
8390 if Preferences.getEditor("AutoReopen") and not self.isModified(): |
8401 if Preferences.getEditor("AutoReopen") and not self.isModified(): |
8391 self.__refresh() |
8402 self.__refresh() |
8392 else: |
8403 else: |
8393 msg = self.tr( |
8404 msg = self.tr( |
8394 """<p>The file <b>{0}</b> has been changed while it""" |
8405 """<p>The file <b>{0}</b> has been changed while it""" |