Author: rharabien
Date: Thu Jan 12 22:26:50 2012
New Revision: 54928
URL:
http://svn.reactos.org/svn/reactos?rev=54928&view=rev
Log:
[SHELL32]
- Update file icon after rename operation
See issue #6815 for more details.
Modified:
trunk/reactos/dll/win32/shell32/shlview.cpp
Modified: trunk/reactos/dll/win32/shell32/shlview.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlview.…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shlview.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shlview.cpp [iso-8859-1] Thu Jan 12 22:26:50 2012
@@ -775,9 +775,10 @@
SendMessageW(hWndList, LVM_GETITEMW, 0, (LPARAM) &lvItem);
SHFree((LPITEMIDLIST)lvItem.lParam);
- lvItem.mask = LVIF_PARAM;
+ lvItem.mask = LVIF_PARAM|LVIF_IMAGE;
lvItem.iItem = nItem;
lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidlNew)); /* set the item's
data */
+ lvItem.iImage = SHMapPIDLToSystemImageListIndex(pSFParent, pidlNew, 0);
SendMessageW(hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem);
SendMessageW(hWndList, LVM_UPDATE, nItem, 0);
return TRUE; /* FIXME: better handling */
@@ -1783,9 +1784,11 @@
if (SUCCEEDED(hr) && pidl)
{
- lvItem.mask = LVIF_PARAM;
+ lvItem.mask = LVIF_PARAM|LVIF_IMAGE;
lvItem.lParam = (LPARAM)pidl;
+ lvItem.iImage = SHMapPIDLToSystemImageListIndex(pSFParent, pidl, 0);
SendMessageW(hWndList, LVM_SETITEMW, 0, (LPARAM) &lvItem);
+ SendMessageW(hWndList, LVM_UPDATE, lpdi->item.iItem, 0);
return TRUE;
}