[SHELL32] Fix a bug that caused Auto Arrange to always be highlighted in the file explorer

This occurred in the file explorer because the menu isn't destroyed and recreated each time, so the menu item, once checked, will stay checked forever.  We must call CheckMenuItem with MF_UNCHECKED to clear the check when necessary
This commit is contained in:
Charles Ambrye 2020-04-19 19:52:52 -07:00 committed by Giannis Adamopoulos
parent c82ba3485e
commit 8c4bd09518

View file

@ -1324,6 +1324,8 @@ HRESULT CDefView::FillArrangeAsMenu(HMENU hmenuArrange)
if (GetAutoArrange() == S_OK)
CheckMenuItem(hmenuArrange, FCIDM_SHVIEW_AUTOARRANGE, MF_CHECKED);
else
CheckMenuItem(hmenuArrange, FCIDM_SHVIEW_AUTOARRANGE, MF_UNCHECKED);
if (_GetSnapToGrid() == S_OK)
CheckMenuItem(hmenuArrange, FCIDM_SHVIEW_ALIGNTOGRID, MF_CHECKED);