From a8bee1830848ff66860532a1e08b34d73797c277 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 2 Nov 2013 07:57:53 -0700 Subject: [PATCH] Select the contents of the Find Next box when the dialog is first created It was only being selected when the dialog already existed and was just being re-shown. --- aegisub/src/dialog_search_replace.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aegisub/src/dialog_search_replace.cpp b/aegisub/src/dialog_search_replace.cpp index cfe0c8793..1c478e92c 100644 --- a/aegisub/src/dialog_search_replace.cpp +++ b/aegisub/src/dialog_search_replace.cpp @@ -116,6 +116,10 @@ DialogSearchReplace::DialogSearchReplace(agi::Context* c, bool replace) SetSizerAndFit(main_sizer); CenterOnParent(); + TransferDataToWindow(); + find_edit->SetFocus(); + find_edit->SelectAll(); + find_next->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogSearchReplace::FindReplace, this, &SearchReplaceEngine::FindNext)); replace_next->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogSearchReplace::FindReplace, this, &SearchReplaceEngine::ReplaceNext)); replace_all->Bind(wxEVT_COMMAND_BUTTON_CLICKED, std::bind(&DialogSearchReplace::FindReplace, this, &SearchReplaceEngine::ReplaceAll));