Fix toolbar bitmap size after toggling icons/text style

When recreating the toolbar we now need to reset the bitmap size too, as
otherwise the correct size is not actually set for the new toolbar.
This commit is contained in:
Vadim Zeitlin
2022-03-20 02:27:18 +01:00
parent 630612e2c9
commit d17171db26

View File

@@ -538,6 +538,11 @@ void wxToolBar::Recreate()
// TB_DELETEBUTTON.
m_nButtons = 0;
// We need to ensure that the tool bitmap size will be adjusted if it's
// different from the default and not from the value used for the toolbar
// we just destroyed.
wxToolBarBase::DoSetToolBitmapSize(wxSize(16, 15));
Realize();
}