TASInputDlg: Simplify event queueing calls

wxQueueEvent/wxPostEvent are useful when the event is being dispatched
to another separate window, but aren't really necessary when the event
will be handled by the same window it's dispatched from.

GetEventHandler() is unnecessary here for the same reason. It's an event
intended to be handled by the dialog itself.
This commit is contained in:
Lioncash 2017-04-02 08:02:45 -04:00
parent 598a92426f
commit 28395c6302

View File

@ -1159,7 +1159,7 @@ void TASInputDlg::InvalidateButton(Button* button)
{
auto* evt = new wxCommandEvent(INVALIDATE_BUTTON_EVENT, button->id);
evt->SetClientData(button);
wxQueueEvent(this, evt);
QueueEvent(evt);
return;
}
@ -1173,7 +1173,7 @@ void TASInputDlg::InvalidateControl(Control* control)
{
auto* evt = new wxCommandEvent(INVALIDATE_CONTROL_EVENT, control->text_id);
evt->SetClientData(control);
wxQueueEvent(this, evt);
QueueEvent(evt);
return;
}
@ -1184,7 +1184,7 @@ void TASInputDlg::InvalidateExtension()
{
if (!wxIsMainThread())
{
GetEventHandler()->QueueEvent(new wxThreadEvent(INVALIDATE_EXTENSION_EVENT));
QueueEvent(new wxThreadEvent(INVALIDATE_EXTENSION_EVENT));
return;
}