Applied patch [ 818941 ] Initialize vars and clear wxImageList
Also small speedup in wxFileIconsTable git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1645,16 +1645,17 @@ int wxFileIconsTable::GetIconID(const wxString& extension, const wxString& mime)
|
||||
return newid;
|
||||
}
|
||||
|
||||
wxBitmap tmpBmp;
|
||||
tmpBmp.CopyFromIcon(ic);
|
||||
wxImage img = tmpBmp.ConvertToImage();
|
||||
wxBitmap bmp;
|
||||
bmp.CopyFromIcon(ic);
|
||||
|
||||
int id = m_smallImageList->GetImageCount();
|
||||
if (img.GetWidth() == 16 && img.GetHeight() == 16)
|
||||
m_smallImageList->Add(wxBitmap(img));
|
||||
if ((bmp.GetWidth() == 16) && (bmp.GetHeight() == 16))
|
||||
m_smallImageList->Add(bmp);
|
||||
else
|
||||
{
|
||||
if (img.GetWidth() != 32 || img.GetHeight() != 32)
|
||||
wxImage img = bmp.ConvertToImage();
|
||||
|
||||
if ((img.GetWidth() != 32) || (img.GetHeight() != 32))
|
||||
m_smallImageList->Add(CreateAntialiasedBitmap(CutEmptyBorders(img).Rescale(32, 32)));
|
||||
else
|
||||
m_smallImageList->Add(CreateAntialiasedBitmap(img));
|
||||
|
Reference in New Issue
Block a user