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:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user