QScintilla/Editor.py

branch
5_2_x
changeset 1832
01f9c5dc0dbe
parent 1808
8e4ee8def45a
child 1931
0e67826e1991
equal deleted inserted replaced
1828:9d0b9cab7ca5 1832:01f9c5dc0dbe
5359 self.__updateReadOnly(False) 5359 self.__updateReadOnly(False)
5360 if self.vm.editorsCheckFocusInEnabled() and \ 5360 if self.vm.editorsCheckFocusInEnabled() and \
5361 not self.inReopenPrompt and self.fileName and \ 5361 not self.inReopenPrompt and self.fileName and \
5362 QFileInfo(self.fileName).lastModified().toString() != \ 5362 QFileInfo(self.fileName).lastModified().toString() != \
5363 self.lastModified.toString(): 5363 self.lastModified.toString():
5364 self.inReopenPrompt = True
5364 if Preferences.getEditor("AutoReopen") and not self.isModified(): 5365 if Preferences.getEditor("AutoReopen") and not self.isModified():
5365 self.refresh() 5366 self.refresh()
5366 else: 5367 else:
5367 self.inReopenPrompt = True
5368 msg = self.trUtf8( 5368 msg = self.trUtf8(
5369 """<p>The file <b>{0}</b> has been changed while it was opened in""" 5369 """<p>The file <b>{0}</b> has been changed while it was opened in"""
5370 """ eric5. Reread it?</p>""").format(self.fileName) 5370 """ eric5. Reread it?</p>""").format(self.fileName)
5371 yesDefault = True 5371 yesDefault = True
5372 if self.isModified(): 5372 if self.isModified():
5381 if res: 5381 if res:
5382 self.refresh() 5382 self.refresh()
5383 else: 5383 else:
5384 # do not prompt for this change again... 5384 # do not prompt for this change again...
5385 self.lastModified = QFileInfo(self.fileName).lastModified() 5385 self.lastModified = QFileInfo(self.fileName).lastModified()
5386 self.inReopenPrompt = False 5386 self.inReopenPrompt = False
5387 5387
5388 self.setCursorFlashTime(QApplication.cursorFlashTime()) 5388 self.setCursorFlashTime(QApplication.cursorFlashTime())
5389 5389
5390 super().focusInEvent(event) 5390 super().focusInEvent(event)
5391 5391

eric ide

mercurial