eric6/QScintilla/QsciScintillaCompat.py

changeset 7348
79ae0af9558a
parent 7267
aedc309827c7
child 7360
9190402e4505
--- 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