Fix check sign in Encoding menu not shown issue

Fix #3737, close #3738
This commit is contained in:
Cyrillev 2017-09-14 21:03:42 +02:00 committed by Don HO
parent d901c73f7d
commit 053823e8ca
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -3911,7 +3911,8 @@ void Notepad_plus::checkUnicodeMenuItems() const
if (encoding == -1)
{
// Uncheck all in the sub encoding menu
::CheckMenuRadioItem(_mainMenuHandle, IDM_FORMAT_ENCODE, IDM_FORMAT_ENCODE_END, IDM_FORMAT_ENCODE, MF_BYCOMMAND);
HMENU _formatMenuHandle = ::GetSubMenu(_mainMenuHandle, MENUINDEX_FORMAT);
doCheck(_formatMenuHandle, IDM_FORMAT_ENCODE);
::CheckMenuItem(_mainMenuHandle, IDM_FORMAT_ENCODE, MF_UNCHECKED | MF_BYCOMMAND);
if (id == -1) //um == uni16BE_NoBOM || um == uni16LE_NoBOM
@ -3941,7 +3942,8 @@ void Notepad_plus::checkUnicodeMenuItems() const
::CheckMenuItem(_mainMenuHandle, IDM_FORMAT_ANSI, MF_UNCHECKED | MF_BYCOMMAND);
// Check the encoding item
::CheckMenuRadioItem(_mainMenuHandle, IDM_FORMAT_ENCODE, IDM_FORMAT_ENCODE_END, cmdID, MF_BYCOMMAND);
HMENU _formatMenuHandle = ::GetSubMenu(_mainMenuHandle, MENUINDEX_FORMAT);
doCheck(_formatMenuHandle, cmdID);
}
}