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