X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7f1fbf609f074c39aa5aabca3144308660f806d..6cc687bfee071b5328f9e48d1708795287006bb7:/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