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;
|
return newid;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmap tmpBmp;
|
wxBitmap bmp;
|
||||||
tmpBmp.CopyFromIcon(ic);
|
bmp.CopyFromIcon(ic);
|
||||||
wxImage img = tmpBmp.ConvertToImage();
|
|
||||||
|
|
||||||
int id = m_smallImageList->GetImageCount();
|
int id = m_smallImageList->GetImageCount();
|
||||||
if (img.GetWidth() == 16 && img.GetHeight() == 16)
|
if ((bmp.GetWidth() == 16) && (bmp.GetHeight() == 16))
|
||||||
m_smallImageList->Add(wxBitmap(img));
|
m_smallImageList->Add(bmp);
|
||||||
else
|
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)));
|
m_smallImageList->Add(CreateAntialiasedBitmap(CutEmptyBorders(img).Rescale(32, 32)));
|
||||||
else
|
else
|
||||||
m_smallImageList->Add(CreateAntialiasedBitmap(img));
|
m_smallImageList->Add(CreateAntialiasedBitmap(img));
|
||||||
|
@@ -45,6 +45,7 @@ wxGenericImageList::wxGenericImageList( int width, int height, bool mask, int in
|
|||||||
|
|
||||||
wxGenericImageList::~wxGenericImageList()
|
wxGenericImageList::~wxGenericImageList()
|
||||||
{
|
{
|
||||||
|
(void)RemoveAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxGenericImageList::GetImageCount() const
|
int wxGenericImageList::GetImageCount() const
|
||||||
|
@@ -4595,6 +4595,8 @@ bool wxGenericListCtrl::Create(wxWindow *parent,
|
|||||||
m_mainWin = (wxListMainWindow*) NULL;
|
m_mainWin = (wxListMainWindow*) NULL;
|
||||||
m_headerWin = (wxListHeaderWindow*) NULL;
|
m_headerWin = (wxListHeaderWindow*) NULL;
|
||||||
|
|
||||||
|
m_headerHeight = 0;
|
||||||
|
|
||||||
if ( !(style & wxLC_MASK_TYPE) )
|
if ( !(style & wxLC_MASK_TYPE) )
|
||||||
{
|
{
|
||||||
style = style | wxLC_LIST;
|
style = style | wxLC_LIST;
|
||||||
|
@@ -273,6 +273,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxClipboard,wxObject)
|
|||||||
wxClipboard::wxClipboard()
|
wxClipboard::wxClipboard()
|
||||||
{
|
{
|
||||||
m_open = FALSE;
|
m_open = FALSE;
|
||||||
|
m_waiting = FALSE;
|
||||||
|
|
||||||
m_ownsClipboard = FALSE;
|
m_ownsClipboard = FALSE;
|
||||||
m_ownsPrimarySelection = FALSE;
|
m_ownsPrimarySelection = FALSE;
|
||||||
|
@@ -273,6 +273,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxClipboard,wxObject)
|
|||||||
wxClipboard::wxClipboard()
|
wxClipboard::wxClipboard()
|
||||||
{
|
{
|
||||||
m_open = FALSE;
|
m_open = FALSE;
|
||||||
|
m_waiting = FALSE;
|
||||||
|
|
||||||
m_ownsClipboard = FALSE;
|
m_ownsClipboard = FALSE;
|
||||||
m_ownsPrimarySelection = FALSE;
|
m_ownsPrimarySelection = FALSE;
|
||||||
|
Reference in New Issue
Block a user