forked from mia/Aegisub
Fix error when a dropdown in the preferences dialog has no values
Originally committed to SVN as r6772.
This commit is contained in:
parent
d04bc6d9b4
commit
57e06a6cad
1 changed files with 1 additions and 1 deletions
|
@ -194,7 +194,7 @@ void OptionPage::OptionChoice(wxFlexGridSizer *flex, const wxString &name, const
|
||||||
wxString val(lagi_wxString(opt->GetString()));
|
wxString val(lagi_wxString(opt->GetString()));
|
||||||
if (cb->FindString(val) != wxNOT_FOUND)
|
if (cb->FindString(val) != wxNOT_FOUND)
|
||||||
cb->SetStringSelection(val);
|
cb->SetStringSelection(val);
|
||||||
else
|
else if (!choices.empty())
|
||||||
cb->SetSelection(0);
|
cb->SetSelection(0);
|
||||||
cb->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, StringUpdater(opt_name, parent));
|
cb->Bind(wxEVT_COMMAND_COMBOBOX_SELECTED, StringUpdater(opt_name, parent));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue