From: Robin Dunn Date: Wed, 18 Oct 2006 03:41:50 +0000 (+0000) Subject: don't clear the tooltip unless there is one. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/122c2bae32138468f1da8bd78d6166bff19de3d1 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 --- diff --git a/wxPython/wx/lib/buttonpanel.py b/wxPython/wx/lib/buttonpanel.py index 05d9b3be58..872ef93822 100644 --- a/wxPython/wx/lib/buttonpanel.py +++ b/wxPython/wx/lib/buttonpanel.py @@ -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)