A little enhancement to the help browser URL bar. 6_1_x

Sun, 31 Jan 2016 18:42:51 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 31 Jan 2016 18:42:51 +0100
branch
6_1_x
changeset 4708
d0d2f95bd712
parent 4706
4cdd97fbc522
child 4719
cc8bf8ed8720

A little enhancement to the help browser URL bar.
(grafted from 8336901cdbfa55f66efd155ee412e3cf89098d64)

Helpviewer/UrlBar/UrlBar.py file | annotate | diff | comparison | revisions
--- a/Helpviewer/UrlBar/UrlBar.py	Sun Jan 31 17:02:21 2016 +0100
+++ b/Helpviewer/UrlBar/UrlBar.py	Sun Jan 31 18:42:51 2016 +0100
@@ -382,10 +382,14 @@
         
         @param evt reference to the key press event (QKeyEvent)
         """
-        if evt.key() == Qt.Key_Escape and self.__browser is not None:
-            self.setText(
-                str(self.__browser.url().toEncoded(), encoding="utf-8"))
-            self.selectAll()
+        if evt.key() == Qt.Key_Escape:
+            if self.__browser is not None:
+                self.setText(
+                    str(self.__browser.url().toEncoded(), encoding="utf-8"))
+                self.selectAll()
+            completer = self.completer()
+            if completer:
+                completer.popup().hide()
             return
         
         currentText = self.text().strip()

eric ide

mercurial