##// END OF EJS Templates
Fixed bug where calltips would sometimes inappropriately disappear on OSX.
epatters -
Show More
@@ -59,7 +59,7 b' class CallTipWidget(QtGui.QLabel):'
59 59 self._hide_timer.stop()
60 60
61 61 elif etype == QtCore.QEvent.Leave:
62 self._hide_later()
62 self._leave_event_hide()
63 63
64 64 return super(CallTipWidget, self).eventFilter(obj, event)
65 65
@@ -92,7 +92,7 b' class CallTipWidget(QtGui.QLabel):'
92 92 """ Reimplemented to start the hide timer.
93 93 """
94 94 super(CallTipWidget, self).leaveEvent(event)
95 self._hide_later()
95 self._leave_event_hide()
96 96
97 97 def paintEvent(self, event):
98 98 """ Reimplemented to paint the background panel.
@@ -205,10 +205,15 b' class CallTipWidget(QtGui.QLabel):'
205 205 position = -1
206 206 return position, commas
207 207
208 def _hide_later(self):
209 """ Hides the tooltip after some time has passed.
208 def _leave_event_hide(self):
209 """ Hides the tooltip after some time has passed (assuming the cursor is
210 not over the tooltip).
210 211 """
211 if not self._hide_timer.isActive():
212 if (not self._hide_timer.isActive() and
213 # If Enter events always came after Leave events, we wouldn't need
214 # this check. But on Mac OS, it sometimes happens the other way
215 # around when the tooltip is created.
216 QtGui.qApp.topLevelAt(QtGui.QCursor.pos()) != self):
212 217 self._hide_timer.start(300, self)
213 218
214 219 #------ Signal handlers ----------------------------------------------------
General Comments 0
You need to be logged in to leave comments. Login now