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:
Vadim Zeitlin
2022-02-05 20:35:46 +01:00
parent bec31f1919
commit 338cd95c2d
8 changed files with 25 additions and 49 deletions

View File

@@ -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)