mirror of https://github.com/PCSX2/pcsx2.git
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.
This commit is contained in:
parent
629bb23832
commit
c3dbc4e945
|
@ -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();
|
||||
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<traceLogCount; ++i )
|
||||
{
|
||||
if (!traceLogList[i] || !m_checks[i]) continue;
|
||||
|
|
|
@ -76,7 +76,6 @@ namespace Panels
|
|||
protected:
|
||||
eeLogOptionsPanel* m_eeSection;
|
||||
iopLogOptionsPanel* m_iopSection;
|
||||
bool m_IsDirty; // any settings modified since last apply will flag this "true"
|
||||
|
||||
pxCheckBox* m_masterEnabler;
|
||||
|
||||
|
|
Loading…
Reference in New Issue