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:
@@ -1256,6 +1256,7 @@ class ButtonPanel(wx.PyPanel):
|
|||||||
self._useHelp = True
|
self._useHelp = True
|
||||||
self._freezeCount = 0
|
self._freezeCount = 0
|
||||||
self._currentButton = -1
|
self._currentButton = -1
|
||||||
|
self._haveTip = False
|
||||||
|
|
||||||
self._art = BPArt(style)
|
self._art = BPArt(style)
|
||||||
|
|
||||||
@@ -1857,10 +1858,11 @@ class ButtonPanel(wx.PyPanel):
|
|||||||
|
|
||||||
if not self.GetUseHelp():
|
if not self.GetUseHelp():
|
||||||
return
|
return
|
||||||
|
|
||||||
shortHelp = hit.GetShortHelp()
|
shortHelp = hit.GetShortHelp()
|
||||||
if shortHelp:
|
if shortHelp:
|
||||||
self.SetToolTipString(shortHelp)
|
self.SetToolTipString(shortHelp)
|
||||||
|
self._haveTip = True
|
||||||
|
|
||||||
longHelp = hit.GetLongHelp()
|
longHelp = hit.GetLongHelp()
|
||||||
if not longHelp:
|
if not longHelp:
|
||||||
@@ -1886,7 +1888,9 @@ class ButtonPanel(wx.PyPanel):
|
|||||||
if not self.GetUseHelp():
|
if not self.GetUseHelp():
|
||||||
return
|
return
|
||||||
|
|
||||||
self.SetToolTipString("")
|
if self._haveTip:
|
||||||
|
self.SetToolTipString("")
|
||||||
|
self._haveTip = False
|
||||||
|
|
||||||
if self._statusTimer and self._statusTimer.IsRunning():
|
if self._statusTimer and self._statusTimer.IsRunning():
|
||||||
topLevel = wx.GetTopLevelParent(self)
|
topLevel = wx.GetTopLevelParent(self)
|
||||||
|
Reference in New Issue
Block a user