From 1c54c4ed04e221024135f2b41417f144634eca8a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 28 Nov 2009 02:29:02 +0000 Subject: [PATCH] Avoid infinite recursion in wxToolbook::OnSize() under wxMSW. Reset m_needsRealizing flag before calling wxToolBar::Realize() as doing this can result in another call to wxToolbook::OnSize() itself. Closes #11942. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/toolbkg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generic/toolbkg.cpp b/src/generic/toolbkg.cpp index cfe93d59fb..944147a970 100644 --- a/src/generic/toolbkg.cpp +++ b/src/generic/toolbkg.cpp @@ -268,6 +268,8 @@ void wxToolbook::Realize() { if (m_needsRealizing) { + m_needsRealizing = false; + GetToolBar()->SetToolBitmapSize(m_maxBitmapSize); int remap = wxSystemOptions::GetOptionInt(wxT("msw.remap")); @@ -276,8 +278,6 @@ void wxToolbook::Realize() wxSystemOptions::SetOption(wxT("msw.remap"), remap); } - m_needsRealizing = false; - if (m_selection == -1) m_selection = 0; -- 2.45.2