From c3dbc4e9456c0a4d0bda6bc326c3ab6f9eb7d750 Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Sun, 4 Feb 2018 00:09:11 +0000 Subject: [PATCH] gui: Fix apply button on Trace Logging dialog Instead of binding all checkbox events to an event handler, bind only the master trace log toggle checkbox event and continue processing the event after it has been handled. This fixes the non-functional apply button and is also more efficient. --- pcsx2/gui/Panels/LogOptionsPanels.cpp | 11 +++-------- pcsx2/gui/Panels/LogOptionsPanels.h | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/pcsx2/gui/Panels/LogOptionsPanels.cpp b/pcsx2/gui/Panels/LogOptionsPanels.cpp index 969a4f0028..a9a5cde453 100644 --- a/pcsx2/gui/Panels/LogOptionsPanels.cpp +++ b/pcsx2/gui/Panels/LogOptionsPanels.cpp @@ -265,7 +265,7 @@ Panels::LogOptionsPanel::LogOptionsPanel(wxWindow* parent ) *this += topSizer | StdExpand(); *this += s_misc | StdSpace().Centre(); - Bind(wxEVT_CHECKBOX, &LogOptionsPanel::OnCheckBoxClicked, this); + Bind(wxEVT_CHECKBOX, &LogOptionsPanel::OnCheckBoxClicked, this, m_masterEnabler->GetWxPtr()->GetId()); } Panels::BaseCpuLogOptionsPanel* Panels::LogOptionsPanel::GetCpuPanel( const wxString& token ) const @@ -303,22 +303,17 @@ void Panels::LogOptionsPanel::OnUpdateEnableAll() void Panels::LogOptionsPanel::OnCheckBoxClicked(wxCommandEvent &evt) { - m_IsDirty = true; - if( evt.GetId() == m_masterEnabler->GetWxPtr()->GetId() ) - OnUpdateEnableAll(); + OnUpdateEnableAll(); + evt.Skip(); } void Panels::LogOptionsPanel::Apply() { - if( !m_IsDirty ) return; - g_Conf->EmuOptions.Trace.Enabled = m_masterEnabler->GetValue(); m_eeSection->Apply(); m_iopSection->Apply(); - m_IsDirty = false; - for( uint i = 0; i