Don't swallow : keypresses in TimeEdit

Originally committed to SVN as r6883.
This commit is contained in:
Thomas Goyne 2012-05-28 14:18:40 +00:00
parent a3d7d2bbc0
commit 108c38b9bc

View file

@ -148,16 +148,16 @@ void TimeEdit::OnKeyDown(wxKeyEvent &event) {
PasteTime();
else
event.Skip();
return;
}
// Shift-Insert would paste the stuff anyway
// but no one updates the private "time" variable.
else if (event.ShiftDown()) {
if (key == WXK_INSERT)
if (event.ShiftDown() && key == WXK_INSERT) {
PasteTime();
else
event.Skip();
return;
}
else {
// Translate numpad presses to normal numbers
if (key >= WXK_NUMPAD0 && key <= WXK_NUMPAD9)
key += '0' - WXK_NUMPAD0;
@ -199,7 +199,6 @@ void TimeEdit::OnKeyDown(wxKeyEvent &event) {
time = text.Left(start) + (char)key + text.Mid(start + 1);
SetValue(time.GetASSFormated());
SetInsertionPoint(start + 1);
}
}
void TimeEdit::OnInsertChanged(agi::OptionValue const& opt) {