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.
This commit is contained in:
Thomas Goyne 2013-11-02 07:57:53 -07:00
parent 766b82d71b
commit a8bee18308
1 changed files with 4 additions and 0 deletions

View File

@ -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));