QsciScintillaCompat: fixed (hopefully) a focus related issue causing completion list to stay.

Thu, 05 Dec 2019 19:44:27 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 05 Dec 2019 19:44:27 +0100
changeset 7348
79ae0af9558a
parent 7347
1afdabb901dc
child 7352
5f69f55b919f

QsciScintillaCompat: fixed (hopefully) a focus related issue causing completion list to stay.

eric6/QScintilla/QsciScintillaCompat.py file | annotate | diff | comparison | revisions
--- a/eric6/QScintilla/QsciScintillaCompat.py	Thu Dec 05 19:43:27 2019 +0100
+++ b/eric6/QScintilla/QsciScintillaCompat.py	Thu Dec 05 19:44:27 2019 +0100
@@ -1426,7 +1426,10 @@
         @param event event object (QFocusEvent)
         """
         if self.isListActive():
-            if event.reason() == Qt.ActiveWindowFocusReason:
+            if event.reason() in [
+                Qt.ActiveWindowFocusReason,
+                Qt.OtherFocusReason
+            ]:
                 aw = QApplication.activeWindow()
                 if aw is None or aw.parent() is not self:
                     self.cancelList()
@@ -1434,7 +1437,10 @@
                 self.cancelList()
         
         if self.isCallTipActive():
-            if event.reason() == Qt.ActiveWindowFocusReason:
+            if event.reason() in [
+                Qt.ActiveWindowFocusReason,
+                Qt.OtherFocusReason
+            ]:
                 aw = QApplication.activeWindow()
                 if aw is None or aw.parent() is not self:
                     self.SendScintilla(QsciScintilla.SCI_CALLTIPCANCEL)

eric ide

mercurial