Don't suppress accelerators that include Enter just because a tree control is focused
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2301cda008
commit
20bdddadd5
@ -1948,7 +1948,11 @@ bool wxTreeCtrl::MSWShouldPreProcessMessage(WXMSG* msg)
|
|||||||
{
|
{
|
||||||
if ( msg->message == WM_KEYDOWN )
|
if ( msg->message == WM_KEYDOWN )
|
||||||
{
|
{
|
||||||
if ( msg->wParam == VK_RETURN )
|
const bool isAltDown = ::GetKeyState(VK_MENU) < 0;
|
||||||
|
|
||||||
|
// Only eat VK_RETURN if not being used by the application in conjunction with
|
||||||
|
// modifiers
|
||||||
|
if ( msg->wParam == VK_RETURN && !wxIsCtrlDown() && !wxIsShiftDown() && !isAltDown)
|
||||||
{
|
{
|
||||||
// we need VK_RETURN to generate wxEVT_COMMAND_TREE_ITEM_ACTIVATED
|
// we need VK_RETURN to generate wxEVT_COMMAND_TREE_ITEM_ACTIVATED
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user