Module: wine Branch: master Commit: 1e6786699d960293b73e8c217ed38542dd5a8f8c URL: http://source.winehq.org/git/wine.git/?a=commit;h=1e6786699d960293b73e8c217e...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Nov 15 11:33:35 2006 +0100
Revert "comctl32: Fix a potential regression in ImageList_ReplaceIcon()."
This reverts commit 9e772d1369f0292cfb79d8cabc017611fc6d0369.
---
dlls/comctl32/imagelist.c | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c index 6b7793e..18a88c5 100644 --- a/dlls/comctl32/imagelist.c +++ b/dlls/comctl32/imagelist.c @@ -2252,7 +2252,6 @@ ImageList_ReplaceIcon (HIMAGELIST himl, BITMAP bmp; BOOL ret; POINT pt; - INT i;
TRACE("(%p %d %p)\n", himl, nIndex, hIcon);
@@ -2315,17 +2314,14 @@ ImageList_ReplaceIcon (HIMAGELIST himl, SetBkColor (himl->hdcImage, RGB(255,255,255)); hbmOldSrc = SelectObject (hdcImage, ii.hbmColor);
- for (i=0; i<(bmp.bmWidth/himl->cx); i++) { - - imagelist_point_from_index(himl, nIndex+i, &pt); - StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy, - hdcImage, 0, 0, himl->cx*i, bmp.bmHeight, SRCCOPY); + imagelist_point_from_index(himl, nIndex, &pt); + StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy, + hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY);
- if (himl->hbmMask) { - SelectObject (hdcImage, ii.hbmMask); - StretchBlt (himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy, - hdcImage, 0, 0, himl->cx*i, bmp.bmHeight, SRCCOPY); - } + if (himl->hbmMask) { + SelectObject (hdcImage, ii.hbmMask); + StretchBlt (himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy, + hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY); }
SelectObject (hdcImage, hbmOldSrc);