mirror of
https://github.com/reactos/reactos.git
synced 2024-10-15 05:37:44 +00:00
[shell32]
- Do not call OnDefaultCommand when there is no selected item in the shell view svn path=/trunk/; revision=59580
This commit is contained in:
parent
99c37102d1
commit
b5c485fb74
|
@ -1102,6 +1102,10 @@ HRESULT CDefView::OpenSelectedItems()
|
||||||
UINT uCommand;
|
UINT uCommand;
|
||||||
HRESULT hResult;
|
HRESULT hResult;
|
||||||
|
|
||||||
|
cidl = ListView_GetSelectedCount(hWndList);
|
||||||
|
if (cidl == 0)
|
||||||
|
return S_OK;
|
||||||
|
|
||||||
hResult = OnDefaultCommand();
|
hResult = OnDefaultCommand();
|
||||||
if (hResult == S_OK)
|
if (hResult == S_OK)
|
||||||
return hResult;
|
return hResult;
|
||||||
|
@ -1175,7 +1179,7 @@ LRESULT CDefView::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &b
|
||||||
if (!hMenu)
|
if (!hMenu)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
GetSelections();
|
cidl = ListView_GetSelectedCount(hWndList);
|
||||||
|
|
||||||
hResult = GetItemObject( cidl ? SVGIO_SELECTION : SVGIO_BACKGROUND, IID_IContextMenu, (LPVOID *)&pCM);
|
hResult = GetItemObject( cidl ? SVGIO_SELECTION : SVGIO_BACKGROUND, IID_IContextMenu, (LPVOID *)&pCM);
|
||||||
if (FAILED( hResult))
|
if (FAILED( hResult))
|
||||||
|
|
Loading…
Reference in a new issue