From bf1ddf4f7b4526a362208d28c4b0d1d604b6bd04 Mon Sep 17 00:00:00 2001 From: harukalover Date: Thu, 11 Jun 2009 02:33:21 +0000 Subject: [PATCH] * Fixed an issue with the translation assistant not remembering the last position it was placed at before closing it * Fixed some memory leaks in the translation assistant Originally committed to SVN as r3045. --- aegisub/src/dialog_translation.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); }