Merge pull request #4951 from OmrSi/menu-shortcuts-undocked-patch

Fix menu shortcuts not working controls undocked
This commit is contained in:
Nikolaj Olsson 2021-04-05 16:38:55 +02:00 committed by GitHub
commit dfb7b50b19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 37 additions and 0 deletions

View File

@ -30096,5 +30096,13 @@ namespace Nikse.SubtitleEdit.Forms
}
}
}
public bool ProcessCmdKeyFromChildForm(ref Message msg, Keys keyData)
{
Message messageCopy = msg;
messageCopy.HWnd = Handle;
return ProcessCmdKey(ref messageCopy, keyData);
}
}
}

View File

@ -53,5 +53,15 @@ namespace Nikse.SubtitleEdit.Forms
_mainForm.MainKeyDown(sender, e);
}
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (_mainForm.ProcessCmdKeyFromChildForm(ref msg, keyData))
{
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
}

View File

@ -168,5 +168,14 @@ namespace Nikse.SubtitleEdit.Forms
Refresh();
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (_mainForm.ProcessCmdKeyFromChildForm(ref msg, keyData))
{
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
}

View File

@ -50,5 +50,15 @@ namespace Nikse.SubtitleEdit.Forms
_mainForm.MainKeyDown(sender, e);
}
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (_mainForm.ProcessCmdKeyFromChildForm(ref msg, keyData))
{
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
}