mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-10-15 02:53:32 +08:00
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") );
|
||||
|
||||
AllocExclusive();
|
||||
|
||||
GetGDIImageData()->m_scaleFactor = scale;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user