mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:26:17 +00:00
[BROWSEUI] Update the current directory before creating a view
This way, when the view asks for a directory _during creation_ it does not get either an old, or an invalid directory CORE-17270
This commit is contained in:
parent
7b17d8d900
commit
ca087b6a18
1 changed files with 4 additions and 4 deletions
|
@ -974,6 +974,10 @@ HRESULT CShellBrowser::BrowseToPath(IShellFolder *newShellFolder,
|
||||||
ZeroMemory(&shellViewWindowBounds, sizeof(shellViewWindowBounds));
|
ZeroMemory(&shellViewWindowBounds, sizeof(shellViewWindowBounds));
|
||||||
::MapWindowPoints(0, m_hWnd, reinterpret_cast<POINT *>(&shellViewWindowBounds), 2);
|
::MapWindowPoints(0, m_hWnd, reinterpret_cast<POINT *>(&shellViewWindowBounds), 2);
|
||||||
|
|
||||||
|
// update current pidl
|
||||||
|
ILFree(fCurrentDirectoryPIDL);
|
||||||
|
fCurrentDirectoryPIDL = ILClone(absolutePIDL);
|
||||||
|
|
||||||
// create view window
|
// create view window
|
||||||
hResult = newShellView->CreateViewWindow(saveCurrentShellView, folderSettings,
|
hResult = newShellView->CreateViewWindow(saveCurrentShellView, folderSettings,
|
||||||
this, &shellViewWindowBounds, &newShellViewWindow);
|
this, &shellViewWindowBounds, &newShellViewWindow);
|
||||||
|
@ -988,10 +992,6 @@ HRESULT CShellBrowser::BrowseToPath(IShellFolder *newShellFolder,
|
||||||
return hResult;
|
return hResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
// update current pidl
|
|
||||||
ILFree(fCurrentDirectoryPIDL);
|
|
||||||
fCurrentDirectoryPIDL = ILClone(absolutePIDL);
|
|
||||||
|
|
||||||
// update view window
|
// update view window
|
||||||
if (saveCurrentShellView != NULL)
|
if (saveCurrentShellView != NULL)
|
||||||
saveCurrentShellView->DestroyViewWindow();
|
saveCurrentShellView->DestroyViewWindow();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue