X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7f1fbf609f074c39aa5aabca3144308660f806d..70914290a18a1c95c16ff5148d53f3dea52d2940:/src/generic/imaglist.cpp diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index aa3a292208..64995176e2 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -75,9 +75,9 @@ int wxImageList::Add( const wxBitmap& bitmap, const wxBitmap& mask ) int wxImageList::Add( const wxBitmap& bitmap, const wxColour& maskColour ) { - wxImage img(bitmap); + wxImage img = bitmap.ConvertToImage(); img.SetMaskColour(maskColour.Red(), maskColour.Green(), maskColour.Blue()); - return Add(img.ConvertToBitmap()); + return Add(wxBitmap(img)); } const wxBitmap *wxImageList::GetBitmap( int index ) const