mirror of
https://github.com/reactos/reactos.git
synced 2024-07-08 21:55:08 +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;
|
||||
HRESULT hResult;
|
||||
|
||||
cidl = ListView_GetSelectedCount(hWndList);
|
||||
if (cidl == 0)
|
||||
return S_OK;
|
||||
|
||||
hResult = OnDefaultCommand();
|
||||
if (hResult == S_OK)
|
||||
return hResult;
|
||||
|
@ -1175,7 +1179,7 @@ LRESULT CDefView::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &b
|
|||
if (!hMenu)
|
||||
return E_FAIL;
|
||||
|
||||
GetSelections();
|
||||
cidl = ListView_GetSelectedCount(hWndList);
|
||||
|
||||
hResult = GetItemObject( cidl ? SVGIO_SELECTION : SVGIO_BACKGROUND, IID_IContextMenu, (LPVOID *)&pCM);
|
||||
if (FAILED( hResult))
|
||||
|
|
Loading…
Reference in a new issue