src/eric7/QScintilla/Editor.py

branch
eric7
changeset 10449
cc468bd2abdf
parent 10439
21c28b0f9e41
child 10460
3b34efa2857c
child 10465
56a3364150b1
equal deleted inserted replaced
10448:36cb4087e87f 10449:cc468bd2abdf
1817 self.inEolChanged = True 1817 self.inEolChanged = True
1818 eol = self.getLineSeparator() 1818 eol = self.getLineSeparator()
1819 self.eolChanged.emit(eol) 1819 self.eolChanged.emit(eol)
1820 self.inEolChanged = False 1820 self.inEolChanged = False
1821 1821
1822 def convertEols(self, eolMode):
1823 """
1824 Public method to convert the end-of-line marker.
1825
1826 This variant of the method emits a signal to update the IDE after
1827 the original method was called.
1828
1829 @param eolMode end-of-line mode
1830 @type QsciScintilla.EolMode
1831 """
1832 super().convertEols(eolMode)
1833 self.__eolChanged()
1834
1822 @pyqtSlot() 1835 @pyqtSlot()
1823 def __showContextMenuSpellCheck(self): 1836 def __showContextMenuSpellCheck(self):
1824 """ 1837 """
1825 Private slot handling the aboutToShow signal of the spell check 1838 Private slot handling the aboutToShow signal of the spell check
1826 context menu. 1839 context menu.
3472 3485
3473 if noempty and not bool(txt): 3486 if noempty and not bool(txt):
3474 return 3487 return
3475 3488
3476 with EricOverrideCursor(): 3489 with EricOverrideCursor():
3477 modified = False
3478
3479 self.setText(txt) 3490 self.setText(txt)
3491 self.setModified(False)
3480 3492
3481 # get eric specific flags 3493 # get eric specific flags
3482 self.__processFlags() 3494 self.__processFlags()
3483 3495
3484 # perform automatic EOL conversion 3496 # perform automatic EOL conversion
3487 ) or Preferences.getEditor("AutomaticEOLConversion"): 3499 ) or Preferences.getEditor("AutomaticEOLConversion"):
3488 self.convertEols(self.eolMode()) 3500 self.convertEols(self.eolMode())
3489 else: 3501 else:
3490 fileEol = self.detectEolString(txt) 3502 fileEol = self.detectEolString(txt)
3491 self.setEolModeByEolString(fileEol) 3503 self.setEolModeByEolString(fileEol)
3504 self.__eolChanged()
3492 3505
3493 self.extractTasks() 3506 self.extractTasks()
3494 3507
3495 self.setModified(modified)
3496 self.lastModified = pathlib.Path(fn).stat().st_mtime 3508 self.lastModified = pathlib.Path(fn).stat().st_mtime
3497 3509
3498 @pyqtSlot() 3510 @pyqtSlot()
3499 def __convertTabs(self): 3511 def __convertTabs(self):
3500 """ 3512 """

eric ide

mercurial