eric6/WebBrowser/WebBrowserTabBar.py

changeset 8227
349308e84eeb
parent 8218
7c09585bd960
child 8269
87f521f359d5
equal deleted inserted replaced
8226:6dc5b1db7bdc 8227:349308e84eeb
105 105
106 # If found and not the current tab then show tab preview 106 # If found and not the current tab then show tab preview
107 if ( 107 if (
108 tabIndex != -1 and 108 tabIndex != -1 and
109 tabIndex != self.currentIndex() and 109 tabIndex != self.currentIndex() and
110 evt.buttons() == Qt.MouseButton.NoButton 110 evt.buttons() == Qt.MouseButton.NoButton and
111 (self.__previewPopup is None or
112 (self.__previewPopup is not None and
113 self.__previewPopup.getCustomData("index") != tabIndex)
114 )
111 ): 115 ):
112 if ( 116 QTimer.singleShot(0, lambda: self.__showTabPreview(tabIndex))
113 self.__previewPopup is None or
114 (self.__previewPopup is not None and
115 self.__previewPopup.getCustomData("index") != tabIndex)
116 ):
117 QTimer.singleShot(
118 0, lambda: self.__showTabPreview(tabIndex))
119 117
120 # If current tab or not found then hide previous tab preview 118 # If current tab or not found then hide previous tab preview
121 if tabIndex in (self.currentIndex(), -1): 119 if tabIndex in (self.currentIndex(), -1):
122 self.__hidePreview() 120 self.__hidePreview()
123 121

eric ide

mercurial