- Force a recompute when setting map modes.

svn path=/trunk/; revision=36652
This commit is contained in:
James Tabor 2008-10-05 11:26:09 +00:00
parent 23bb9ae68f
commit 18edd07564
2 changed files with 10 additions and 8 deletions

View file

@ -1275,8 +1275,13 @@ SetMapMode(
return 0; return 0;
} }
#endif #endif
if ((Mode == Dc_Attr->iMapMode) && (Mode != MM_ISOTROPIC)) return Mode; // Force change if Isotropic is set for recompute.
return GetAndSetDCDWord( hdc, GdiGetSetMapMode, Mode, 0, 0, 0 ); if ((Mode != Dc_Attr->iMapMode) || (Mode == MM_ISOTROPIC))
{
Dc_Attr->ulDirty_ &= ~SLOW_WIDTHS;
return GetAndSetDCDWord( hdc, GdiGetSetMapMode, Mode, 0, 0, 0 );
}
return Dc_Attr->iMapMode;
} }
/* /*

View file

@ -657,12 +657,10 @@ IntGdiSetMapMode(PDC dc,
PrevMapMode = Dc_Attr->iMapMode; PrevMapMode = Dc_Attr->iMapMode;
if (MapMode != Dc_Attr->iMapMode || (MapMode != MM_ISOTROPIC && MapMode != MM_ANISOTROPIC)) Dc_Attr->iMapMode = MapMode;
{
Dc_Attr->iMapMode = MapMode;
switch (MapMode) switch (MapMode)
{ {
case MM_TEXT: case MM_TEXT:
Dc_Attr->szlWindowExt.cx = 1; Dc_Attr->szlWindowExt.cx = 1;
Dc_Attr->szlWindowExt.cy = 1; Dc_Attr->szlWindowExt.cy = 1;
@ -717,7 +715,6 @@ IntGdiSetMapMode(PDC dc,
default: default:
Dc_Attr->iMapMode = PrevMapMode; Dc_Attr->iMapMode = PrevMapMode;
PrevMapMode = 0; PrevMapMode = 0;
}
DC_UpdateXforms(dc); DC_UpdateXforms(dc);
} }