Minor fix to wxGraphicsContext::SetInterpolationQuality() in wxMSW.
Only update the internal variable if we really succeeded in changing the interpolation mode. See #14134. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1541,8 +1541,6 @@ bool wxGDIPlusContext::SetInterpolationQuality(wxInterpolationQuality interpolat
|
|||||||
if (m_interpolation == interpolation)
|
if (m_interpolation == interpolation)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
m_interpolation = interpolation;
|
|
||||||
|
|
||||||
InterpolationMode interpolationMode = InterpolationModeDefault;
|
InterpolationMode interpolationMode = InterpolationModeDefault;
|
||||||
switch (interpolation)
|
switch (interpolation)
|
||||||
{
|
{
|
||||||
@@ -1569,7 +1567,12 @@ bool wxGDIPlusContext::SetInterpolationQuality(wxInterpolationQuality interpolat
|
|||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_context->SetInterpolationMode(interpolationMode);
|
|
||||||
|
if ( m_context->SetInterpolationMode(interpolationMode) != Gdiplus::Ok )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
m_interpolation = interpolation;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user