Move GetBitmapFromBundle() to wxMenuItemBase
This is just a refactoring to avoid duplicating this function code in all ports and just have it once in the base class.
This commit is contained in:
@@ -768,19 +768,7 @@ void wxMenuItem::SetBitmap(const wxBitmapBundle& bitmap)
|
||||
|
||||
wxBitmap wxMenuItem::GetBitmap() const
|
||||
{
|
||||
wxBitmap bmp;
|
||||
if ( m_bitmap.IsOk() )
|
||||
{
|
||||
if ( m_parentMenu && m_parentMenu->GetWindow() )
|
||||
{
|
||||
bmp = m_bitmap.GetBitmapFor(m_parentMenu->GetWindow());
|
||||
}
|
||||
else
|
||||
{
|
||||
bmp = m_bitmap.GetBitmap(wxDefaultSize);
|
||||
}
|
||||
}
|
||||
return bmp;
|
||||
return GetBitmapFromBundle(m_bitmap);
|
||||
}
|
||||
|
||||
void wxMenuItem::SetupBitmaps(wxWindow *win)
|
||||
|
||||
Reference in New Issue
Block a user