eric7/QScintilla/MiniEditor.py

branch
eric7
changeset 8322
b422b4e77d19
parent 8318
962bce857696
child 8356
68ec9c3d4de5
--- a/eric7/QScintilla/MiniEditor.py	Mon May 17 19:58:15 2021 +0200
+++ b/eric7/QScintilla/MiniEditor.py	Tue May 18 18:19:47 2021 +0200
@@ -2861,8 +2861,6 @@
         self.__textEdit.setMarginWidth(2, 16)
         if Preferences.getEditor("FoldingMargin"):
             folding = Preferences.getEditor("FoldingStyle")
-            with contextlib.suppress(AttributeError):
-                folding = QsciScintilla.FoldStyle(folding)
             self.__textEdit.setFolding(folding)
             self.__textEdit.setFoldMarginColors(
                 Preferences.getEditorColour("FoldmarginBackground"),
@@ -2871,7 +2869,8 @@
                 Preferences.getEditorColour("FoldMarkersForeground"),
                 Preferences.getEditorColour("FoldMarkersBackground"))
         else:
-            self.__textEdit.setFolding(QsciScintilla.FoldStyle.NoFoldStyle)
+            self.__textEdit.setFolding(
+                QsciScintilla.FoldStyle.NoFoldStyle.value)
     
     def __resizeLinenoMargin(self):
         """

eric ide

mercurial