mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 20:53:02 +00:00
[REGEDIT] Fix ListView selection and finding (#5150)
We will check the data size correctly, instead of 3 NUL byte appending hack. Add bSelectNone parameter to UpdateAddress and RefreshListView functions. If bSelectNone is TRUE, then select nothing of ListView. Fix item selection of ListView. Rename CompareData helper function as MatchData and improve it. Improve the search algorithm. If the item selection of ListView changed, scroll down to the item. Follow up to #5146. CORE-15986, CORE-18230
This commit is contained in:
parent
aac89519ec
commit
84e580b67e
6 changed files with 65 additions and 70 deletions
|
@ -643,7 +643,7 @@ BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
|
|||
/* Get the parent of the current item */
|
||||
HTREEITEM hParentItem = TreeView_GetParent(g_pChildWnd->hTreeWnd, pnmtv->itemNew.hItem);
|
||||
|
||||
UpdateAddress(pnmtv->itemNew.hItem, NULL, NULL);
|
||||
UpdateAddress(pnmtv->itemNew.hItem, NULL, NULL, TRUE);
|
||||
|
||||
/* Disable the Permissions menu item for 'My Computer' */
|
||||
EnableMenuItem(hMenuFrame, ID_EDIT_PERMISSIONS, MF_BYCOMMAND | (hParentItem ? MF_ENABLED : MF_GRAYED));
|
||||
|
@ -722,7 +722,7 @@ BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
|
|||
lResult = FALSE;
|
||||
}
|
||||
else
|
||||
UpdateAddress(ptvdi->item.hItem, hRootKey, szBuffer);
|
||||
UpdateAddress(ptvdi->item.hItem, hRootKey, szBuffer, FALSE);
|
||||
}
|
||||
*Result = lResult;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue