Merge pull request #2885 from endrift/tasinputdlg-threading
DolphinWX: Finish removing bandaid from 704f787
This commit is contained in:
parent
de5b14444b
commit
4f0e2f6b62
|
@ -208,7 +208,6 @@ void TASInputDlg::FinishLayout()
|
||||||
Bind(wxEVT_CLOSE_WINDOW, &TASInputDlg::OnCloseWindow, this);
|
Bind(wxEVT_CLOSE_WINDOW, &TASInputDlg::OnCloseWindow, this);
|
||||||
Bind(GCPAD_UPDATE_CALLBACK, &TASInputDlg::GetValuesCallback, this);
|
Bind(GCPAD_UPDATE_CALLBACK, &TASInputDlg::GetValuesCallback, this);
|
||||||
Bind(WIIMOTE_UPDATE_CALLBACK, &TASInputDlg::GetValuesCallback, this);
|
Bind(WIIMOTE_UPDATE_CALLBACK, &TASInputDlg::GetValuesCallback, this);
|
||||||
Bind(wxEVT_TEXT, &TASInputDlg::UpdateFromText, this);
|
|
||||||
m_has_layout = true;
|
m_has_layout = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -508,22 +507,14 @@ void TASInputDlg::SetSliderValue(Control* control, int CurrentValue)
|
||||||
{
|
{
|
||||||
control->value = CurrentValue;
|
control->value = CurrentValue;
|
||||||
control->set_by_keyboard = true;
|
control->set_by_keyboard = true;
|
||||||
control->text->ChangeValue(std::to_string(CurrentValue));
|
control->text->SetValue(std::to_string(CurrentValue));
|
||||||
}
|
}
|
||||||
else if (control->set_by_keyboard)
|
else if (control->set_by_keyboard)
|
||||||
{
|
{
|
||||||
control->value = control->default_value;
|
control->value = control->default_value;
|
||||||
control->set_by_keyboard = false;
|
control->set_by_keyboard = false;
|
||||||
control->text->ChangeValue(std::to_string(control->default_value));
|
control->text->SetValue(std::to_string(control->default_value));
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxCommandEvent* evt = new wxCommandEvent(wxEVT_TEXT, control->text_id);
|
|
||||||
evt->SetEventObject(control->text);
|
|
||||||
wxQueueEvent(this, evt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TASInputDlg::SetButtonValue(Button* button, bool CurrentState)
|
void TASInputDlg::SetButtonValue(Button* button, bool CurrentState)
|
||||||
|
|
Loading…
Reference in New Issue