Changed the editor method to update the 'read only' information to public. eric7

Sat, 03 May 2025 18:06:28 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 03 May 2025 18:06:28 +0200
branch
eric7
changeset 11258
955bf672a1a1
parent 11257
54a66ef9c9db
child 11259
0802dce3d1c3

Changed the editor method to update the 'read only' information to public.

src/eric7/QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- a/src/eric7/QScintilla/Editor.py	Sat May 03 18:01:01 2025 +0200
+++ b/src/eric7/QScintilla/Editor.py	Sat May 03 18:06:28 2025 +0200
@@ -604,7 +604,7 @@
         # Make sure tabbing through a QWorkspace works.
         self.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
 
-        self.__updateReadOnly(True)
+        self.updateReadOnly(True)
 
         self.setWhatsThis(
             self.tr(
@@ -3996,7 +3996,7 @@
 
         self.recordModificationTime()
         self.vm.setEditorName(self, self.fileName)
-        self.__updateReadOnly(True)
+        self.updateReadOnly(True)
 
     @pyqtSlot(str)
     def fileRenamed(self, fn):
@@ -8158,7 +8158,7 @@
         with contextlib.suppress(AttributeError):
             self.setCaretWidth(self.caretWidth)
         if not self.dbs.isDebugging:
-            self.__updateReadOnly(False)
+            self.updateReadOnly(False)
         self.setCursorFlashTime(QApplication.cursorFlashTime())
 
         if (
@@ -8343,9 +8343,9 @@
             self.__markerMap.calculateGeometry()
         return super().viewportEvent(evt)
 
-    def __updateReadOnly(self, bForce=True):
-        """
-        Private method to update the readOnly information for this editor.
+    def updateReadOnly(self, bForce=True):
+        """
+        Public method to update the readOnly information for this editor.
 
         If bForce is True, then updates everything regardless if
         the attributes have actually changed, such as during
@@ -9350,7 +9350,7 @@
         if not connected:
             self.__inRemoteSharedEdit = False
             self.setReadOnly(False)
-            self.__updateReadOnly()
+            self.updateReadOnly()
             self.cancelSharedEdit(send=False)
             self.__isSyncing = False
             self.__receivedWhileSyncing = []
@@ -9474,7 +9474,7 @@
         if not self.__inSharedEdit and not self.__inRemoteSharedEdit:
             self.__inRemoteSharedEdit = True
             self.setReadOnly(True)
-            self.__updateReadOnly()
+            self.updateReadOnly()
             hashStr = str(
                 QCryptographicHash.hash(
                     Utilities.encode(self.text(), self.encoding)[0],
@@ -9553,7 +9553,7 @@
                 self.insertAt(txt, pos, 0)
                 del commands[0:l2]
         self.endUndoAction()
-        self.__updateReadOnly()
+        self.updateReadOnly()
         self.__inRemoteSharedEdit = False
 
         self.setCursorPosition(*cur)

eric ide

mercurial