Fix inconsistency of Document List context menu

Document List context menu now appears only when files are selected.

Fix #10463, close #10464
This commit is contained in:
Ashfaaq18 2021-08-30 13:32:35 +05:30 committed by Don Ho
parent dab02db976
commit 5c52aff7a1
1 changed files with 10 additions and 6 deletions

View File

@ -147,12 +147,16 @@ INT_PTR CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam,
activateDoc(tlfs); activateDoc(tlfs);
} }
if (nbSelectedFiles() >= 1)
{
// Redirect NM_RCLICK message to Notepad_plus handle // Redirect NM_RCLICK message to Notepad_plus handle
NMHDR nmhdr; NMHDR nmhdr;
nmhdr.code = NM_RCLICK; nmhdr.code = NM_RCLICK;
nmhdr.hwndFrom = _hSelf; nmhdr.hwndFrom = _hSelf;
nmhdr.idFrom = ::GetDlgCtrlID(nmhdr.hwndFrom); nmhdr.idFrom = ::GetDlgCtrlID(nmhdr.hwndFrom);
::SendMessage(_hParent, WM_NOTIFY, nmhdr.idFrom, reinterpret_cast<LPARAM>(&nmhdr)); ::SendMessage(_hParent, WM_NOTIFY, nmhdr.idFrom, reinterpret_cast<LPARAM>(&nmhdr));
}
return TRUE; return TRUE;
} }