From 5d83eee7dd97b88b4adceb635342ba32d940acef Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 30 Sep 2012 20:35:33 +0000 Subject: [PATCH] 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 --- src/generic/srchctlg.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/generic/srchctlg.cpp b/src/generic/srchctlg.cpp index 8e472f4888..acf408c2dd 100644 --- a/src/generic/srchctlg.cpp +++ b/src/generic/srchctlg.cpp @@ -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 -- 2.47.2