mirror of
https://github.com/reactos/reactos.git
synced 2025-04-05 21:21:33 +00:00
[BROWSEUI][SHELL32] Fix scroll to selection CORE-16504
A patch by Katayama Hirofumi MZ
The bug was unhidden by
0.4.14-dev-312-g
b931f643e3
This commit is contained in:
parent
e196149b71
commit
dc047f9630
2 changed files with 9 additions and 4 deletions
|
@ -380,7 +380,7 @@ static HRESULT ExplorerMessageLoop(IEThreadParamBlock * parameters)
|
|||
hResult = psb->QueryActiveShellView(&shellView);
|
||||
if (SUCCEEDED(hResult))
|
||||
{
|
||||
shellView->SelectItem(pidlSelect, SVSI_SELECT|SVSI_ENSUREVISIBLE);
|
||||
shellView->SelectItem(pidlSelect, SVSI_SELECT | SVSI_FOCUSED | SVSI_ENSUREVISIBLE);
|
||||
}
|
||||
ILFree(pidlSelect);
|
||||
}
|
||||
|
|
|
@ -2379,9 +2379,6 @@ HRESULT WINAPI CDefView::SelectItem(PCUITEMID_CHILD pidl, UINT uFlags)
|
|||
if (i == -1)
|
||||
return S_OK;
|
||||
|
||||
if(uFlags & SVSI_ENSUREVISIBLE)
|
||||
m_ListView.EnsureVisible(i, FALSE);
|
||||
|
||||
LVITEMW lvItem = {0};
|
||||
lvItem.mask = LVIF_STATE;
|
||||
lvItem.stateMask = LVIS_SELECTED | LVIS_FOCUSED;
|
||||
|
@ -2396,18 +2393,26 @@ HRESULT WINAPI CDefView::SelectItem(PCUITEMID_CHILD pidl, UINT uFlags)
|
|||
lvItem.state &= ~LVIS_SELECTED;
|
||||
|
||||
if (uFlags & SVSI_FOCUSED)
|
||||
lvItem.state |= LVIS_FOCUSED;
|
||||
else
|
||||
lvItem.state &= ~LVIS_FOCUSED;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (uFlags & SVSI_DESELECTOTHERS)
|
||||
{
|
||||
lvItem.state &= ~LVIS_SELECTED;
|
||||
}
|
||||
lvItem.state &= ~LVIS_FOCUSED;
|
||||
}
|
||||
|
||||
m_ListView.SetItem(&lvItem);
|
||||
lvItem.iItem++;
|
||||
}
|
||||
|
||||
if (uFlags & SVSI_ENSUREVISIBLE)
|
||||
m_ListView.EnsureVisible(i, FALSE);
|
||||
|
||||
if((uFlags & SVSI_EDIT) == SVSI_EDIT)
|
||||
m_ListView.EditLabel(i);
|
||||
|
||||
|
|
Loading…
Reference in a new issue