Fix converting wxBitmap to wxImage on wxGTK2

wxBitmap can have both a mask and alpha channel so resulting wxImage
also can have both.
This commit is contained in:
Artur Wieczorek
2021-01-12 23:35:19 +01:00
parent 030664c148
commit b1467ae608

View File

@@ -883,8 +883,8 @@ wxImage wxBitmap::ConvertToImage() const
if (pixmap_invert != NULL)
g_object_unref(pixmap_invert);
}
// convert mask, unless there is already alpha
if (GetMask() && !image.HasAlpha())
// convert mask, even there is already alpha. Image can have both.
if ( GetMask() )
{
// we hard code the mask colour for now but we could also make an
// effort (and waste time) to choose a colour not present in the