Remove unnecessary wxToolbook::m_maxBitmapSize

We don't need to keep track of the bitmap size and call
SetToolBitmapSize() ourselves, wxToolBar should be (and is) able to do
it on its own.
This commit is contained in:
Vadim Zeitlin
2021-11-12 17:54:02 +00:00
parent 717225c205
commit bf12e8e99a
2 changed files with 0 additions and 9 deletions

View File

@@ -115,9 +115,6 @@ protected:
// whether the toolbar needs to be realized
bool m_needsRealizing;
// maximum bitmap size
wxSize m_maxBitmapSize;
private:
// common part of all constructors
void Init();

View File

@@ -200,8 +200,6 @@ void wxToolbook::Realize()
{
m_needsRealizing = false;
GetToolBar()->SetToolBitmapSize(m_maxBitmapSize);
GetToolBar()->Realize();
}
@@ -289,11 +287,7 @@ bool wxToolbook::InsertPage(size_t n,
bitmap.CopyFromIcon(icon);
#endif
m_maxBitmapSize.x = wxMax(bitmap.GetWidth(), m_maxBitmapSize.x);
m_maxBitmapSize.y = wxMax(bitmap.GetHeight(), m_maxBitmapSize.y);
int toolId = page->GetId();
GetToolBar()->SetToolBitmapSize(m_maxBitmapSize);
GetToolBar()->InsertTool(n, toolId, text, bitmap, wxNullBitmap, wxITEM_RADIO);
// fix current selection