Fix the command "Empty recent files list" doesn't restore menu width

Closes #2399
This commit is contained in:
Don HO 2017-02-18 18:41:43 +01:00
parent 6373222668
commit 4a0e880557

View File

@ -129,7 +129,6 @@ void LastRecentFileList::updateMenu()
::InsertMenu(_hParentMenu, _posBase + 0, MF_BYPOSITION | MF_POPUP, reinterpret_cast<UINT_PTR>(_hMenu), (LPCTSTR)recentFileList.c_str()); ::InsertMenu(_hParentMenu, _posBase + 0, MF_BYPOSITION | MF_POPUP, reinterpret_cast<UINT_PTR>(_hMenu), (LPCTSTR)recentFileList.c_str());
::InsertMenu(_hParentMenu, _posBase + 1, MF_BYPOSITION, static_cast<UINT_PTR>(-1), 0); ::InsertMenu(_hParentMenu, _posBase + 1, MF_BYPOSITION, static_cast<UINT_PTR>(-1), 0);
} }
_pAccelerator->updateFullMenu();
} }
else if (_hasSeparators && _size == 0) //remove separators else if (_hasSeparators && _size == 0) //remove separators
{ {
@ -151,6 +150,8 @@ void LastRecentFileList::updateMenu()
} }
} }
_pAccelerator->updateFullMenu();
//Remove all menu items //Remove all menu items
for(int i = 0; i < _size; ++i) for(int i = 0; i < _size; ++i)
{ {