mirror of https://github.com/odrling/Aegisub
Set both the initial and value fields of spin controls in the preferences dialog since wx ports are inconsistent about which is used
Originally committed to SVN as r6788.
This commit is contained in:
parent
5b9ba0205a
commit
4940a98e85
|
@ -144,14 +144,14 @@ wxControl *OptionPage::OptionAdd(wxFlexGridSizer *flex, const wxString &name, co
|
||||||
}
|
}
|
||||||
|
|
||||||
case agi::OptionValue::Type_Int: {
|
case agi::OptionValue::Type_Int: {
|
||||||
wxSpinCtrl *sc = new wxSpinCtrl(this, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetInt());
|
wxSpinCtrl *sc = new wxSpinCtrl(this, -1, wxString::Format("%d", (int)opt->GetInt()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetInt());
|
||||||
sc->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, IntUpdater(opt_name, parent));
|
sc->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, IntUpdater(opt_name, parent));
|
||||||
Add(flex, name, sc);
|
Add(flex, name, sc);
|
||||||
return sc;
|
return sc;
|
||||||
}
|
}
|
||||||
|
|
||||||
case agi::OptionValue::Type_Double: {
|
case agi::OptionValue::Type_Double: {
|
||||||
wxSpinCtrlDouble *scd = new wxSpinCtrlDouble(this, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetDouble(), inc);
|
wxSpinCtrlDouble *scd = new wxSpinCtrlDouble(this, -1, wxString::Format("%g", opt->GetDouble()), wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, min, max, opt->GetDouble(), inc);
|
||||||
scd->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, DoubleUpdater(opt_name, parent));
|
scd->Bind(wxEVT_COMMAND_SPINCTRL_UPDATED, DoubleUpdater(opt_name, parent));
|
||||||
Add(flex, name, scd);
|
Add(flex, name, scd);
|
||||||
return scd;
|
return scd;
|
||||||
|
|
Loading…
Reference in New Issue