diff --git a/aegisub/src/dialog_translation.cpp b/aegisub/src/dialog_translation.cpp index c11b3267a..44af2bb8d 100644 --- a/aegisub/src/dialog_translation.cpp +++ b/aegisub/src/dialog_translation.cpp @@ -254,7 +254,7 @@ void DialogTranslation::UpdatePreview () { /////////////// // Event table BEGIN_EVENT_TABLE(DialogTranslation, wxDialog) - EVT_BUTTON(wxID_CLOSE,DialogTranslation::OnClose) + EVT_BUTTON(wxID_CANCEL,DialogTranslation::OnClose) EVT_BUTTON(BUTTON_TRANS_PLAY_VIDEO,DialogTranslation::OnPlayVideoButton) EVT_BUTTON(BUTTON_TRANS_PLAY_AUDIO,DialogTranslation::OnPlayAudioButton) END_EVENT_TABLE() @@ -419,7 +419,9 @@ void DialogTranslation::OnPlayAudioButton(wxCommandEvent &event) { // Close void DialogTranslation::OnClose (wxCommandEvent &event) { GetPosition(&lastx, &lasty); - Close(); + TransText->PopEventHandler(true); + PreviewCheck->PopEventHandler(true); + EndModal(0); }