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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 05 Dec 2019 19:44:27 +0100
branch
maintenance
changeset 7350
dd3dea7c4d5f
parent 7349
253e2c326448
child 7351
274baadc5686

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

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