mirror of https://github.com/odrling/Aegisub
OS X: Fix crash when opening Find/Replace dialog
Originally committed to SVN as r6820.
This commit is contained in:
parent
2675bbb831
commit
5c10bfa2f3
|
@ -70,6 +70,7 @@ DialogSearchReplace::DialogSearchReplace(agi::Context* c, bool withReplace)
|
||||||
{
|
{
|
||||||
wxSizer *FindSizer = new wxFlexGridSizer(2,2,5,15);
|
wxSizer *FindSizer = new wxFlexGridSizer(2,2,5,15);
|
||||||
FindEdit = new wxComboBox(this,-1,"",wxDefaultPosition,wxSize(300,-1),lagi_MRU_wxAS("Find"),wxCB_DROPDOWN);
|
FindEdit = new wxComboBox(this,-1,"",wxDefaultPosition,wxSize(300,-1),lagi_MRU_wxAS("Find"),wxCB_DROPDOWN);
|
||||||
|
if (!FindEdit->IsListEmpty())
|
||||||
FindEdit->SetSelection(0);
|
FindEdit->SetSelection(0);
|
||||||
FindSizer->Add(new wxStaticText(this,-1,_("Find what:")),0,wxRIGHT | wxALIGN_CENTER_VERTICAL,0);
|
FindSizer->Add(new wxStaticText(this,-1,_("Find what:")),0,wxRIGHT | wxALIGN_CENTER_VERTICAL,0);
|
||||||
FindSizer->Add(FindEdit,0,wxRIGHT,0);
|
FindSizer->Add(FindEdit,0,wxRIGHT,0);
|
||||||
|
@ -77,6 +78,7 @@ DialogSearchReplace::DialogSearchReplace(agi::Context* c, bool withReplace)
|
||||||
ReplaceEdit = new wxComboBox(this,-1,"",wxDefaultPosition,wxSize(300,-1),lagi_MRU_wxAS("Replace"),wxCB_DROPDOWN);
|
ReplaceEdit = new wxComboBox(this,-1,"",wxDefaultPosition,wxSize(300,-1),lagi_MRU_wxAS("Replace"),wxCB_DROPDOWN);
|
||||||
FindSizer->Add(new wxStaticText(this,-1,_("Replace with:")),0,wxRIGHT | wxALIGN_CENTER_VERTICAL,0);
|
FindSizer->Add(new wxStaticText(this,-1,_("Replace with:")),0,wxRIGHT | wxALIGN_CENTER_VERTICAL,0);
|
||||||
FindSizer->Add(ReplaceEdit,0,wxRIGHT,0);
|
FindSizer->Add(ReplaceEdit,0,wxRIGHT,0);
|
||||||
|
if (!ReplaceEdit->IsListEmpty())
|
||||||
ReplaceEdit->SetSelection(0);
|
ReplaceEdit->SetSelection(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,6 +203,7 @@ void DialogSearchReplace::UpdateDropDowns() {
|
||||||
FindEdit->Freeze();
|
FindEdit->Freeze();
|
||||||
FindEdit->Clear();
|
FindEdit->Clear();
|
||||||
FindEdit->Append(lagi_MRU_wxAS("Find"));
|
FindEdit->Append(lagi_MRU_wxAS("Find"));
|
||||||
|
if (!FindEdit->IsListEmpty())
|
||||||
FindEdit->SetSelection(0);
|
FindEdit->SetSelection(0);
|
||||||
FindEdit->Thaw();
|
FindEdit->Thaw();
|
||||||
|
|
||||||
|
@ -208,6 +211,7 @@ void DialogSearchReplace::UpdateDropDowns() {
|
||||||
ReplaceEdit->Freeze();
|
ReplaceEdit->Freeze();
|
||||||
ReplaceEdit->Clear();
|
ReplaceEdit->Clear();
|
||||||
ReplaceEdit->Append(lagi_MRU_wxAS("Replace"));
|
ReplaceEdit->Append(lagi_MRU_wxAS("Replace"));
|
||||||
|
if (!ReplaceEdit->IsListEmpty())
|
||||||
ReplaceEdit->SetSelection(0);
|
ReplaceEdit->SetSelection(0);
|
||||||
ReplaceEdit->Thaw();
|
ReplaceEdit->Thaw();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue