--- a/eric6/WebBrowser/WebBrowserTabBar.py Wed Sep 25 19:00:09 2019 +0200 +++ b/eric6/WebBrowser/WebBrowserTabBar.py Wed Sep 25 19:11:13 2019 +0200 @@ -104,18 +104,24 @@ i += 1 # If found and not the current tab then show tab preview - if tabIndex != -1 and \ - tabIndex != self.currentIndex() and \ - evt.buttons() == Qt.NoButton: - if self.__previewPopup is None or \ + if ( + tabIndex != -1 and + tabIndex != self.currentIndex() and + evt.buttons() == Qt.NoButton + ): + if ( + self.__previewPopup is None or (self.__previewPopup is not None and - self.__previewPopup.getCustomData("index") != tabIndex): + self.__previewPopup.getCustomData("index") != tabIndex) + ): QTimer.singleShot( 0, lambda: self.__showTabPreview(tabIndex)) # If current tab or not found then hide previous tab preview - if tabIndex == self.currentIndex() or \ - tabIndex == -1: + if ( + tabIndex == self.currentIndex() or + tabIndex == -1 + ): self.__hidePreview() def leaveEvent(self, evt): @@ -151,8 +157,10 @@ @param evt reference to the event to be handled (QEvent) @return flag indicating, if the event was handled (boolean) """ - if evt.type() == QEvent.ToolTip and \ - Preferences.getWebBrowser("ShowPreview"): + if ( + evt.type() == QEvent.ToolTip and + Preferences.getWebBrowser("ShowPreview") + ): # suppress tool tips if we are showing previews evt.setAccepted(True) return True