From d2cbda09c54b78c5173f8371adb7329e41139409 Mon Sep 17 00:00:00 2001 From: Joachim Henze Date: Tue, 13 Jun 2023 19:08:04 +0200 Subject: [PATCH] [0.4.14][SHELL32] Revert CDefView::FillFileMenu (#5278) this fixes: CORE-18429 Explorer should not have duplicated menus in the File menu It regressed by 0.4.14-dev-955-g1cf564c 1cf564c25f532c32f9fae891f17a70e62d5c1c14 And we do now mention here CORE-9467 (and its duplicate CORE-11797 also) to make us aware there is still something to do in this context. The guilty rev aimed to fix those. But it wasn't the right thing to do. by porting back the revert: 0.4.15-dev-6039-g 0fa4edebd9125b9ca7a4256edbea7675e2152c7e and addendum 0.4.15-dev-6083-g d3164a0f557bdc2cc9dfd86612131f6cf180d462 --- dll/win32/shell32/CDefView.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dll/win32/shell32/CDefView.cpp b/dll/win32/shell32/CDefView.cpp index 9152751ddcb..5af762c9d1c 100644 --- a/dll/win32/shell32/CDefView.cpp +++ b/dll/win32/shell32/CDefView.cpp @@ -1241,11 +1241,8 @@ HRESULT CDefView::FillFileMenu() DeleteMenu(hFileMenu, i, MF_BYPOSITION); } - m_cidl = m_ListView.GetSelectedCount(); - /* Store the context menu in m_pCM and keep it in order to invoke the selected command later on */ - HRESULT hr = GetItemObject((m_cidl ? SVGIO_SELECTION : SVGIO_BACKGROUND), - IID_PPV_ARG(IContextMenu, &m_pCM)); + HRESULT hr = GetItemObject(SVGIO_SELECTION, IID_PPV_ARG(IContextMenu, &m_pCM)); if (FAILED_UNEXPECTEDLY(hr)) return hr;