eric7/QScintilla/QsciScintillaCompat.py

branch
eric7
changeset 8581
a6c893c8b7af
parent 8489
45af30c5561d
child 8713
c2a124c2ecbb
--- a/eric7/QScintilla/QsciScintillaCompat.py	Sat Sep 04 20:26:21 2021 +0200
+++ b/eric7/QScintilla/QsciScintillaCompat.py	Sun Sep 05 16:30:19 2021 +0200
@@ -1469,9 +1469,9 @@
             ]:
                 aw = QApplication.activeWindow()
                 if aw is None or aw.parent() is not self:
-                    self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL)
+                    self.cancelCallTips()
             else:
-                self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL)
+                self.cancelCallTips()
         
         super().focusOutEvent(event)
     
@@ -1650,36 +1650,6 @@
             QsciScintilla.SCI_POSITIONFROMLINE, lin)
         return lin, pos - linpos
     
-    ###########################################################################
-    ## methods below have been added to QScintilla starting with version 2.5
-    ###########################################################################
-    
-    if "contractedFolds" not in QsciScintilla.__dict__:
-        def contractedFolds(self):
-            """
-            Public method to get a list of line numbers of collapsed folds.
-            
-            @return list of line numbers of folded lines (list of integer)
-            """
-            line = 0
-            folds = []
-            maxline = self.lines()
-            while line < maxline:
-                if self.foldHeaderAt(line) and not self.foldExpandedAt(line):
-                    folds.append(line)
-                line += 1
-            return folds
-    
-    if "setContractedFolds" not in QsciScintilla.__dict__:
-        def setContractedFolds(self, folds):
-            """
-            Public method to set a list of line numbers of collapsed folds.
-            
-            @param folds list of line numbers of folded lines (list of integer)
-            """
-            for line in folds:
-                self.foldLine(line)
-    
     #########################################################################
     ## Methods below are missing from QScintilla.
     #########################################################################
@@ -1710,6 +1680,13 @@
                                    0, pos)
             return QPoint(x, y)
     
+    if "cancelCallTips" not in QsciScintilla.__dict__:
+        def cancelCallTips(self):
+            """
+            Public method to cancel displayed call tips.
+            """
+            self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL)
+    
 ##    #########################################################################
 ##    ## Methods below have been added to QScintilla starting with version 2.x.
 ##    #########################################################################

eric ide

mercurial