mirror of
https://github.com/reactos/wine.git
synced 2024-11-30 15:10:27 +00:00
regedit: Update a value name without refreshing the listview.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c04f66a59f
commit
ebfe566c16
@ -400,16 +400,13 @@ static LRESULT CALLBACK ListWndProc(HWND hWnd, UINT message, WPARAM wParam, LPAR
|
||||
LPNMLVDISPINFOW dispInfo = (LPNMLVDISPINFOW)lParam;
|
||||
LPWSTR oldName = GetItemText(hWnd, dispInfo->item.iItem);
|
||||
LONG ret;
|
||||
LVITEMW item;
|
||||
|
||||
if (!oldName) return -1; /* cannot rename a default value */
|
||||
ret = RenameValue(hWnd, g_currentRootKey, g_currentPath, oldName, dispInfo->item.pszText);
|
||||
if (ret)
|
||||
{
|
||||
RefreshListView(hWnd, g_currentRootKey, g_currentPath, dispInfo->item.pszText);
|
||||
item.state = LVIS_FOCUSED | LVIS_SELECTED;
|
||||
item.stateMask = LVIS_FOCUSED | LVIS_SELECTED;
|
||||
SendMessageW(hWnd, LVM_SETITEMSTATE, dispInfo->item.iItem, (LPARAM)&item);
|
||||
dispInfo->item.iSubItem = 0;
|
||||
SendMessageW(hWnd, LVM_SETITEMTEXTW, dispInfo->item.iItem, (LPARAM)&dispInfo->item);
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, oldName);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user