[BROWSEUI] Use the last id for custom find files menu item (#7918)

This commit is contained in:
Whindmar Saksit 2025-04-23 18:57:24 +02:00 committed by GitHub
parent 6faee56f86
commit fcc2247774
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 12 deletions

View file

@ -2586,7 +2586,7 @@ LRESULT CDefView::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHand
case FCIDM_SHVIEW_INVERTSELECTION:
nCount = m_ListView.GetItemCount();
for (int i=0; i < nCount; i++)
m_ListView.SetItemState(i, m_ListView.GetItemState(i, LVIS_SELECTED) ? 0 : LVIS_SELECTED, LVIS_SELECTED);
m_ListView.SetItemState(i, m_ListView.GetItemState(i, LVIS_SELECTED) ^ LVIS_SELECTED, LVIS_SELECTED);
break;
case FCIDM_SHVIEW_REFRESH:
Refresh();
@ -4046,7 +4046,7 @@ HRESULT STDMETHODCALLTYPE CDefView::GetSelectedObjects(PCUITEMID_CHILD **pidl, U
return E_OUTOFMEMORY;
}
/* it's documented that caller shouldn't PIDLs, only array itself */
// It's documented that caller shouldn't free the PIDLs, only the array itself
memcpy(*pidl, m_apidl, *items * sizeof(PCUITEMID_CHILD));
}