Use the original image to check for a mask, not the one that may have had the mask converted to alpha

This commit is contained in:
Robin Dunn
2020-10-14 17:42:51 -07:00
parent ab65087e93
commit 097008833e

View File

@@ -1187,8 +1187,8 @@ wxBitmap::wxBitmap(const wxImage& image, int depth, double scale)
GetBitmapData()->EndRawAccess() ;
}
if ( img.HasMask() )
SetMask(new wxMask(*this, wxColour(img.GetMaskRed(), img.GetMaskGreen(), img.GetMaskBlue())));
if ( image.HasMask() )
SetMask(new wxMask(*this, wxColour(image.GetMaskRed(), image.GetMaskGreen(), image.GetMaskBlue())));
}
}