forked from mia/Aegisub
Fix #695, close Translation Assistant when there are no more lines to translate.
Originally committed to SVN as r2199.
This commit is contained in:
parent
6f23c635be
commit
1c60d35d16
1 changed files with 7 additions and 1 deletions
|
@ -335,7 +335,13 @@ void DialogTranslation::OnTransBoxKey(wxKeyEvent &event) {
|
||||||
|
|
||||||
// Next
|
// Next
|
||||||
if (Hotkeys.IsPressed(_T("Translation Assistant Accept"))) {
|
if (Hotkeys.IsPressed(_T("Translation Assistant Accept"))) {
|
||||||
JumpToLine(curline,curblock+1);
|
// JumpToLine() returns false if the requested line doesn't exist.
|
||||||
|
// Assume that means we were on the last line.
|
||||||
|
if (!JumpToLine(curline,curblock+1)) {
|
||||||
|
wxMessageBox(_("No more lines to translate."));
|
||||||
|
EndModal(1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
TransText->ClearAll();
|
TransText->ClearAll();
|
||||||
TransText->SetFocus();
|
TransText->SetFocus();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue