Simplified some code. eric7

Tue, 22 Jun 2021 19:05:18 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 22 Jun 2021 19:05:18 +0200
branch
eric7
changeset 8437
3408f5174e2f
parent 8435
f3554a0a34ca
child 8438
639e7e8fde84

Simplified some code.

eric7/QScintilla/Editor.py file | annotate | diff | comparison | revisions
eric7/QScintilla/MiniEditor.py file | annotate | diff | comparison | revisions
eric7/QScintilla/QsciScintillaCompat.py file | annotate | diff | comparison | revisions
--- a/eric7/QScintilla/Editor.py	Sun Jun 20 18:31:39 2021 +0200
+++ b/eric7/QScintilla/Editor.py	Tue Jun 22 19:05:18 2021 +0200
@@ -4693,7 +4693,6 @@
                 self.setEolMode(eolMode)
         else:
             eolMode = self.__getEditorConfig("EOLMode")
-            eolMode = QsciScintilla.EolMode(eolMode)
             self.setEolMode(eolMode)
         self.__eolChanged()
         
--- a/eric7/QScintilla/MiniEditor.py	Sun Jun 20 18:31:39 2021 +0200
+++ b/eric7/QScintilla/MiniEditor.py	Tue Jun 22 19:05:18 2021 +0200
@@ -3008,7 +3008,6 @@
         Private method to configure the eol mode of the editor.
         """
         eolMode = self.__getEditorConfig("EOLMode")
-        eolMode = QsciScintilla.EolMode(eolMode)
         self.__textEdit.setEolMode(eolMode)
         
     def __setMonospaced(self, on):
--- a/eric7/QScintilla/QsciScintillaCompat.py	Sun Jun 20 18:31:39 2021 +0200
+++ b/eric7/QScintilla/QsciScintillaCompat.py	Tue Jun 22 19:05:18 2021 +0200
@@ -701,14 +701,11 @@
         @param eolStr eol string (string)
         """
         if eolStr == '\r\n':
-            self.setEolMode(
-                QsciScintilla.EolMode(QsciScintilla.EolMode.EolWindows))
+            self.setEolMode(QsciScintilla.EolMode.EolWindows)
         elif eolStr == '\n':
-            self.setEolMode(
-                QsciScintilla.EolMode(QsciScintilla.EolMode.EolUnix))
+            self.setEolMode(QsciScintilla.EolMode.EolUnix)
         elif eolStr == '\r':
-            self.setEolMode(
-                QsciScintilla.EolMode(QsciScintilla.EolMode.EolMac))
+            self.setEolMode(QsciScintilla.EolMode.EolMac)
     
     def detectEolString(self, txt):
         """

eric ide

mercurial