don't clear the tooltip unless there is one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
5f8047a69b
commit
122c2bae32
@ -1256,6 +1256,7 @@ class ButtonPanel(wx.PyPanel):
|
||||
self._useHelp = True
|
||||
self._freezeCount = 0
|
||||
self._currentButton = -1
|
||||
self._haveTip = False
|
||||
|
||||
self._art = BPArt(style)
|
||||
|
||||
@ -1857,10 +1858,11 @@ class ButtonPanel(wx.PyPanel):
|
||||
|
||||
if not self.GetUseHelp():
|
||||
return
|
||||
|
||||
|
||||
shortHelp = hit.GetShortHelp()
|
||||
if shortHelp:
|
||||
self.SetToolTipString(shortHelp)
|
||||
self._haveTip = True
|
||||
|
||||
longHelp = hit.GetLongHelp()
|
||||
if not longHelp:
|
||||
@ -1886,7 +1888,9 @@ class ButtonPanel(wx.PyPanel):
|
||||
if not self.GetUseHelp():
|
||||
return
|
||||
|
||||
self.SetToolTipString("")
|
||||
if self._haveTip:
|
||||
self.SetToolTipString("")
|
||||
self._haveTip = False
|
||||
|
||||
if self._statusTimer and self._statusTimer.IsRunning():
|
||||
topLevel = wx.GetTopLevelParent(self)
|
||||
|
Loading…
Reference in New Issue
Block a user