Helpviewer/UrlBar/FavIconLabel.py

branch
5_1_x
changeset 1541
7fb08da8080a
parent 1510
e75ecf2bd9dd
diff -r 3b0b478a3416 -r 7fb08da8080a Helpviewer/UrlBar/FavIconLabel.py
--- a/Helpviewer/UrlBar/FavIconLabel.py	Thu Jan 12 19:12:39 2012 +0100
+++ b/Helpviewer/UrlBar/FavIconLabel.py	Thu Jan 12 19:14:01 2012 +0100
@@ -8,7 +8,7 @@
 """
 
 from PyQt4.QtCore import Qt, QPoint, QUrl, QMimeData
-from PyQt4.QtGui import QLabel, QApplication, QDrag
+from PyQt4.QtGui import QLabel, QApplication, QDrag, QPixmap
 
 import Helpviewer.HelpWindow
 
@@ -46,6 +46,12 @@
         except RuntimeError:
             pass
     
+    def __clearIcon(self):
+        """
+        Private slot to clear the icon.
+        """
+        self.setPixmap(QPixmap())
+    
     def setBrowser(self, browser):
         """
         Public method to set the browser connection.
@@ -55,6 +61,7 @@
         self.__browser = browser
         self.__browser.loadFinished.connect(self.__browserIconChanged)
         self.__browser.iconChanged.connect(self.__browserIconChanged)
+        self.__browser.loadStarted.connect(self.__clearIcon)
     
     def mousePressEvent(self, evt):
         """

eric ide

mercurial