mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-08-20 01:15:08 -05:00
Merge pull request #4127 from jloehr/FixDialogClosingButtons
Fix dialog closing buttons
This commit is contained in:
@@ -202,10 +202,15 @@ void InputConfigDialog::UpdateControlReferences()
|
||||
}
|
||||
}
|
||||
|
||||
void InputConfigDialog::ClickSave(wxCommandEvent& event)
|
||||
void InputConfigDialog::OnClose(wxCloseEvent& event)
|
||||
{
|
||||
m_config.SaveConfig();
|
||||
event.Skip();
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
||||
void InputConfigDialog::OnCloseButton(wxCommandEvent& event)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
int ControlDialog::GetRangeSliderValue() const
|
||||
@@ -1099,11 +1104,12 @@ InputConfigDialog::InputConfigDialog(wxWindow* const parent, InputConfig& config
|
||||
UpdateDeviceComboBox();
|
||||
UpdateProfileComboBox();
|
||||
|
||||
Bind(wxEVT_BUTTON, &InputConfigDialog::ClickSave, this, wxID_OK);
|
||||
Bind(wxEVT_CLOSE_WINDOW, &InputConfigDialog::OnClose, this);
|
||||
Bind(wxEVT_BUTTON, &InputConfigDialog::OnCloseButton, this, wxID_CLOSE);
|
||||
|
||||
wxBoxSizer* const szr = new wxBoxSizer(wxVERTICAL);
|
||||
szr->Add(m_pad_notebook, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5);
|
||||
szr->Add(CreateButtonSizer(wxOK | wxCANCEL | wxNO_DEFAULT), 0, wxEXPAND | wxALL, 5);
|
||||
szr->Add(CreateButtonSizer(wxCLOSE), 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
SetLayoutAdaptationMode(wxDIALOG_ADAPTATION_MODE_ENABLED);
|
||||
SetSizerAndFit(szr);
|
||||
|
||||
Reference in New Issue
Block a user