]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix computation of menu button best size in generic wxSearchCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 30 Sep 2012 20:35:33 +0000 (20:35 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 30 Sep 2012 20:35:33 +0000 (20:35 +0000)
Invalidate the cached best size when the bitmap changes.

Closes #14708.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/srchctlg.cpp

index 8e472f4888174e0597bd434464850e4edd9d3147..acf408c2dd4a8ab7e9cb5dcbc4db74100d6c0765 100644 (file)
@@ -168,7 +168,11 @@ public:
           m_bmp(bmp)
     { }
 
-    void SetBitmapLabel(const wxBitmap& label) { m_bmp = label; }
+    void SetBitmapLabel(const wxBitmap& label)
+    {
+        m_bmp = label;
+        InvalidateBestSize();
+    }
 
     // The buttons in wxSearchCtrl shouldn't accept focus from keyboard because
     // this would interfere with the usual TAB processing: the user expects