]> git.saurik.com Git - wxWidgets.git/commitdiff
don't clear the tooltip unless there is one.
authorRobin Dunn <robin@alldunn.com>
Wed, 18 Oct 2006 03:41:50 +0000 (03:41 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 18 Oct 2006 03:41:50 +0000 (03:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/lib/buttonpanel.py

index 05d9b3be583431bd2f673ee89e6d3bdeeb99c5c2..872ef938228c14e187dd23cfb7a81d51149af66e 100644 (file)
@@ -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)