mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 04:13:37 +00:00
Used a better check for the root item of the treeview. The listview, status bar and address bar should only get wiped when the user selects the root item of the treeview.
CORE-10803 #comment Retest please! svn path=/trunk/; revision=70691
This commit is contained in:
@@ -309,6 +309,15 @@ UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath)
|
||||
LPCWSTR keyPath, rootName;
|
||||
LPWSTR fullPath;
|
||||
|
||||
/* Wipe the listview, the status bar and the address bar if the root key was selected */
|
||||
if (TreeView_GetParent(g_pChildWnd->hTreeWnd, hItem) == NULL)
|
||||
{
|
||||
(void)ListView_DeleteAllItems(g_pChildWnd->hListWnd);
|
||||
SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)NULL);
|
||||
SendMessageW(g_pChildWnd->hAddressBarWnd, WM_SETTEXT, 0, (LPARAM)NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pszPath == NULL)
|
||||
keyPath = GetItemPath(g_pChildWnd->hTreeWnd, hItem, &hRootKey);
|
||||
else
|
||||
@@ -348,12 +357,6 @@ UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
(void)ListView_DeleteAllItems(g_pChildWnd->hListWnd);
|
||||
SendMessageW(hStatusBar, SB_SETTEXTW, 0, (LPARAM)NULL);
|
||||
SendMessageW(g_pChildWnd->hAddressBarWnd, WM_SETTEXT, 0, (LPARAM)NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user