Fix computation of menu button best size in generic wxSearchCtrl.

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
This commit is contained in:
Vadim Zeitlin
2012-09-30 20:35:33 +00:00
parent e5eff43833
commit 5d83eee7dd

View 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