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
This commit is contained in:
Vadim Zeitlin 2009-11-28 02:29:02 +00:00
parent d395f181b3
commit 1c54c4ed04

View File

@ -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;