[PATCH 3/7] regedit: Update a value name without refreshing the listview
Hugh McMaster
hugh.mcmaster at outlook.com
Mon May 29 03:20:23 CDT 2017
Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
programs/regedit/listview.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c
index b42af8e..e485c77 100644
--- a/programs/regedit/listview.c
+++ b/programs/regedit/listview.c
@@ -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;
--
2.7.4
More information about the wine-patches
mailing list