X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5b9003ae3213f487fa3be74804b426a8ad0db323..3570a1c6e596c358848c77c5b37d724097340ce8:/src/mac/carbon/imaglist.cpp diff --git a/src/mac/carbon/imaglist.cpp b/src/mac/carbon/imaglist.cpp index f97e0715ac..054cdeb734 100644 --- a/src/mac/carbon/imaglist.cpp +++ b/src/mac/carbon/imaglist.cpp @@ -16,9 +16,12 @@ #if wxUSE_IMAGLIST #include "wx/imaglist.h" -#include "wx/icon.h" -#include "wx/image.h" -#include "wx/dc.h" + +#ifndef WX_PRECOMP + #include "wx/dc.h" + #include "wx/icon.h" + #include "wx/image.h" +#endif IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject) @@ -75,7 +78,7 @@ int wxImageList::Add( const wxBitmap &bitmap ) || (m_width == 0 && m_height == 0), _T("invalid bitmap size in wxImageList: this might work ") _T("on this platform but definitely won't under Windows.") ); - + // Mimic behavior of Windows ImageList_Add that automatically breaks up the added // bitmap into sub-images of the correct size if (m_width > 0 && bitmap.GetWidth() > m_width && bitmap.GetHeight() >= m_height) @@ -98,7 +101,7 @@ int wxImageList::Add( const wxBitmap &bitmap ) m_width = bitmap.GetWidth(); m_height = bitmap.GetHeight(); } - + return m_images.GetCount() - 1; } @@ -227,7 +230,7 @@ bool wxImageList::Replace( int index, const wxBitmap &bitmap, const wxBitmap &ma m_images.Erase( node ); m_images.Insert( next, newBitmap ); } - + if (mask.Ok()) newBitmap->SetMask(new wxMask(mask));