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:
@@ -268,6 +268,8 @@ void wxToolbook::Realize()
|
|||||||
{
|
{
|
||||||
if (m_needsRealizing)
|
if (m_needsRealizing)
|
||||||
{
|
{
|
||||||
|
m_needsRealizing = false;
|
||||||
|
|
||||||
GetToolBar()->SetToolBitmapSize(m_maxBitmapSize);
|
GetToolBar()->SetToolBitmapSize(m_maxBitmapSize);
|
||||||
|
|
||||||
int remap = wxSystemOptions::GetOptionInt(wxT("msw.remap"));
|
int remap = wxSystemOptions::GetOptionInt(wxT("msw.remap"));
|
||||||
@@ -276,8 +278,6 @@ void wxToolbook::Realize()
|
|||||||
wxSystemOptions::SetOption(wxT("msw.remap"), remap);
|
wxSystemOptions::SetOption(wxT("msw.remap"), remap);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_needsRealizing = false;
|
|
||||||
|
|
||||||
if (m_selection == -1)
|
if (m_selection == -1)
|
||||||
m_selection = 0;
|
m_selection = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user