Skip unprocessed key events in the time edit control so that it doesn't eat hotkeys

Originally committed to SVN as r6055.
This commit is contained in:
Thomas Goyne 2011-12-22 21:18:07 +00:00
parent cd3b9bfa37
commit 70d703255b
1 changed files with 4 additions and 9 deletions

View File

@ -224,11 +224,7 @@ void TimeEdit::OnKeyDown(wxKeyEvent &event) {
Refresh();
// Check if it's an acceptable key
#ifdef __APPLE__
if (!event.CmdDown()) {
#else
if (!event.ControlDown()) {
#endif
if (byFrame || !insertMode || (key != WXK_BACK && key != WXK_DELETE)) {
// Reset selection first, if necessary
if (!byFrame && insertMode) {
@ -241,17 +237,16 @@ void TimeEdit::OnKeyDown(wxKeyEvent &event) {
event.Skip();
}
}
else {
// Copy
if (key == 'C' || key == 'X') {
CopyTime();
}
// Paste
if (key == 'V') {
else if (key == 'V') {
PasteTime();
}
else {
event.Skip();
}
}
}