Merge pull request #2284 from lioncash/leaks
DolphinWX: Fix memory leaks relating to the TAS dialog
This commit is contained in:
commit
882080c282
|
@ -37,7 +37,6 @@ TASInputDlg::TASInputDlg(wxWindow* parent, wxWindowID id, const wxString& title,
|
||||||
const wxPoint& position, const wxSize& size, long style)
|
const wxPoint& position, const wxSize& size, long style)
|
||||||
: wxDialog(parent, id, title, position, size, style)
|
: wxDialog(parent, id, title, position, size, style)
|
||||||
{
|
{
|
||||||
CreateBaseLayout();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TASInputDlg::CreateBaseLayout()
|
void TASInputDlg::CreateBaseLayout()
|
||||||
|
@ -63,6 +62,7 @@ void TASInputDlg::CreateBaseLayout()
|
||||||
m_dpad_down = CreateButton("Down");
|
m_dpad_down = CreateButton("Down");
|
||||||
m_dpad_left = CreateButton("Left");
|
m_dpad_left = CreateButton("Left");
|
||||||
|
|
||||||
|
m_buttons_dpad = new wxGridSizer(3);
|
||||||
m_buttons_dpad->AddSpacer(20);
|
m_buttons_dpad->AddSpacer(20);
|
||||||
m_buttons_dpad->Add(m_dpad_up.checkbox);
|
m_buttons_dpad->Add(m_dpad_up.checkbox);
|
||||||
m_buttons_dpad->AddSpacer(20);
|
m_buttons_dpad->AddSpacer(20);
|
||||||
|
@ -93,6 +93,8 @@ void TASInputDlg::CreateWiiLayout(int num)
|
||||||
if (m_has_layout)
|
if (m_has_layout)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
CreateBaseLayout();
|
||||||
|
|
||||||
m_buttons[6] = &m_one;
|
m_buttons[6] = &m_one;
|
||||||
m_buttons[7] = &m_two;
|
m_buttons[7] = &m_two;
|
||||||
m_buttons[8] = &m_plus;
|
m_buttons[8] = &m_plus;
|
||||||
|
@ -196,6 +198,8 @@ void TASInputDlg::CreateGCLayout()
|
||||||
if (m_has_layout)
|
if (m_has_layout)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
CreateBaseLayout();
|
||||||
|
|
||||||
m_buttons[6] = &m_x;
|
m_buttons[6] = &m_x;
|
||||||
m_buttons[7] = &m_y;
|
m_buttons[7] = &m_y;
|
||||||
m_buttons[8] = &m_z;
|
m_buttons[8] = &m_z;
|
||||||
|
|
|
@ -121,5 +121,5 @@ class TASInputDlg : public wxDialog
|
||||||
|
|
||||||
bool m_has_layout = false;
|
bool m_has_layout = false;
|
||||||
|
|
||||||
wxGridSizer* const m_buttons_dpad = new wxGridSizer(3);
|
wxGridSizer* m_buttons_dpad;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue