Ensure wxBitmap::SetScaleFactor() doesn't change bitmap copies
Call AllocExclusive() to ensure that we're only changing the scale factor of this object, and not of all the other objects using the same data.
This commit is contained in:
@@ -346,6 +346,8 @@ void wxGDIImage::SetScaleFactor(double scale)
|
|||||||
{
|
{
|
||||||
wxCHECK_RET( IsOk(), wxT("invalid bitmap") );
|
wxCHECK_RET( IsOk(), wxT("invalid bitmap") );
|
||||||
|
|
||||||
|
AllocExclusive();
|
||||||
|
|
||||||
GetGDIImageData()->m_scaleFactor = scale;
|
GetGDIImageData()->m_scaleFactor = scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user