Commit c4747f46 authored by André Hentschel's avatar André Hentschel Committed by Alexandre Julliard

comdlg32: Remove duplicate code (PVS-Studio).

parent 9b810cd6
......@@ -3270,7 +3270,6 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
int iIndentation;
TEXTMETRICW tm;
LPSFOLDER tmpFolder;
LookInInfos *liInfos = GetPropA(pDIStruct->hwndItem,LookInInfosStr);
UINT shgfi_flags = SHGFI_PIDL | SHGFI_OPENICON | SHGFI_SYSICONINDEX | SHGFI_DISPLAYNAME;
UINT icon_width, icon_height;
......@@ -3293,16 +3292,8 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
shgfi_flags |= SHGFI_SMALLICON;
}
if(pDIStruct->itemID == liInfos->uSelectedItem)
{
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
0, &sfi, sizeof (sfi), shgfi_flags );
}
else
{
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
0, &sfi, sizeof (sfi), shgfi_flags );
}
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
0, &sfi, sizeof (sfi), shgfi_flags );
/* Is this item selected ? */
if(pDIStruct->itemState & ODS_SELECTED)
......@@ -3320,16 +3311,10 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
/* Do not indent item if drawing in the edit of the combo */
if(pDIStruct->itemState & ODS_COMBOBOXEDIT)
{
iIndentation = 0;
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
0, &sfi, sizeof (sfi), shgfi_flags );
}
else
{
iIndentation = tmpFolder->m_iIndent;
}
/* Draw text and icon */
/* Initialise the icon display area */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment