[PATCH] regedit: Dont expand items on initial tree creation.
The Message TVM_EXPAND is captured in treeview_notify, then passes g_pChildWnd->hTreeWnd on to OnTreeExpanding which hasn't been initialized yet. The function get_last_key is already called after the hTreeWnd has been assigned to select the previous selected item (if it exists). Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- programs/regedit/treeview.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/programs/regedit/treeview.c b/programs/regedit/treeview.c index d5a6767..15a5136 100644 --- a/programs/regedit/treeview.c +++ b/programs/regedit/treeview.c @@ -572,9 +572,6 @@ static BOOL InitTreeViewItems(HWND hwndTV, LPWSTR pHostName) if (!AddEntryToTree(hwndTV, hRoot, hkcc, HKEY_CURRENT_CONFIG, 1)) return FALSE; if (!AddEntryToTree(hwndTV, hRoot, hkdd, HKEY_DYN_DATA, 1)) return FALSE; - /* expand and select host name */ - SendMessageW(hwndTV, TVM_EXPAND, TVE_EXPAND, (LPARAM)hRoot ); - SendMessageW(hwndTV, TVM_SELECTITEM, TVGN_CARET, (LPARAM)hRoot); return TRUE; } -- 1.9.1
participants (1)
-
Alistair Leslie-Hughes