forked from mia/Aegisub
Don't swallow : keypresses in TimeEdit
Originally committed to SVN as r6883.
This commit is contained in:
parent
a3d7d2bbc0
commit
108c38b9bc
1 changed files with 41 additions and 42 deletions
|
@ -148,16 +148,16 @@ void TimeEdit::OnKeyDown(wxKeyEvent &event) {
|
||||||
PasteTime();
|
PasteTime();
|
||||||
else
|
else
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shift-Insert would paste the stuff anyway
|
// Shift-Insert would paste the stuff anyway
|
||||||
// but no one updates the private "time" variable.
|
// but no one updates the private "time" variable.
|
||||||
else if (event.ShiftDown()) {
|
if (event.ShiftDown() && key == WXK_INSERT) {
|
||||||
if (key == WXK_INSERT)
|
|
||||||
PasteTime();
|
PasteTime();
|
||||||
else
|
return;
|
||||||
event.Skip();
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
// Translate numpad presses to normal numbers
|
// Translate numpad presses to normal numbers
|
||||||
if (key >= WXK_NUMPAD0 && key <= WXK_NUMPAD9)
|
if (key >= WXK_NUMPAD0 && key <= WXK_NUMPAD9)
|
||||||
key += '0' - WXK_NUMPAD0;
|
key += '0' - WXK_NUMPAD0;
|
||||||
|
@ -200,7 +200,6 @@ void TimeEdit::OnKeyDown(wxKeyEvent &event) {
|
||||||
SetValue(time.GetASSFormated());
|
SetValue(time.GetASSFormated());
|
||||||
SetInsertionPoint(start + 1);
|
SetInsertionPoint(start + 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void TimeEdit::OnInsertChanged(agi::OptionValue const& opt) {
|
void TimeEdit::OnInsertChanged(agi::OptionValue const& opt) {
|
||||||
insert = !opt.GetBool();
|
insert = !opt.GetBool();
|
||||||
|
|
Loading…
Reference in a new issue