mirror of https://github.com/PCSX2/pcsx2.git
GUI: presets: don't gray-out static text when presets are disabled
The EE/IOP and VUs panels were disabled completely when presets are enabled, which apparently also means disabling (graying out) the static texts, however, re-enabling them (when disabling presets) didn't un-gray-out the static text. This is likely a wxWidgets bug, but we can avoid it by just enabling/disabling all items explicitly (and keeping the panels themselves always enabled). For these panels, this means adding explicit enable/disable of the he EE-cache checkbox and the Restore-Defaults buttons. The issue doesn't seem to happen on other panels (though some earlier revisions apparently also had this issue for the static text at the game fixes panel, but apparently it's not an issue now).
This commit is contained in:
parent
b1d7f0e3fd
commit
3820bf16fd
|
@ -177,6 +177,7 @@ namespace Panels
|
|||
pxRadioPanel* m_panel_RecIOP;
|
||||
pxCheckBox* m_check_EECacheEnable;
|
||||
AdvancedOptionsFPU* m_advancedOptsFpu;
|
||||
wxButton *m_button_RestoreDefaults;
|
||||
|
||||
public:
|
||||
CpuPanelEE( wxWindow* parent );
|
||||
|
@ -196,6 +197,7 @@ namespace Panels
|
|||
pxRadioPanel* m_panel_VU0;
|
||||
pxRadioPanel* m_panel_VU1;
|
||||
Panels::AdvancedOptionsVU* m_advancedOptsVu;
|
||||
wxButton *m_button_RestoreDefaults;
|
||||
|
||||
public:
|
||||
CpuPanelVU( wxWindow* parent );
|
||||
|
|
|
@ -167,7 +167,8 @@ Panels::CpuPanelEE::CpuPanelEE( wxWindow* parent )
|
|||
*this += (m_advancedOptsFpu = new AdvancedOptionsFPU( this )) | StdExpand();
|
||||
|
||||
*this += 12;
|
||||
*this += new wxButton( this, wxID_DEFAULT, _("Restore Defaults")) | StdButton();
|
||||
m_button_RestoreDefaults = new wxButton(this, wxID_DEFAULT, _("Restore Defaults"));
|
||||
*this += m_button_RestoreDefaults | StdButton();
|
||||
|
||||
Connect( wxID_DEFAULT, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CpuPanelEE::OnRestoreDefaults ) );
|
||||
}
|
||||
|
@ -221,7 +222,8 @@ Panels::CpuPanelVU::CpuPanelVU( wxWindow* parent )
|
|||
*this += ( m_advancedOptsVu=new AdvancedOptionsVU( this )) | StdExpand();
|
||||
|
||||
*this += 12;
|
||||
*this += new wxButton( this, wxID_DEFAULT, _("Restore Defaults") ) | StdButton();
|
||||
m_button_RestoreDefaults = new wxButton(this, wxID_DEFAULT, _("Restore Defaults"));
|
||||
*this += m_button_RestoreDefaults | StdButton();
|
||||
|
||||
Connect( wxID_DEFAULT, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CpuPanelVU::OnRestoreDefaults ) );
|
||||
}
|
||||
|
@ -250,8 +252,8 @@ void Panels::CpuPanelEE::ApplyConfigToGui( AppConfig& configToApply, int flags )
|
|||
m_panel_RecIOP->Enable(!configToApply.EnablePresets);
|
||||
|
||||
m_check_EECacheEnable ->SetValue(recOps.EnableEECache);
|
||||
|
||||
this->Enable(!configToApply.EnablePresets);
|
||||
m_check_EECacheEnable->Enable(!configToApply.EnablePresets);
|
||||
m_button_RestoreDefaults->Enable(!configToApply.EnablePresets);
|
||||
|
||||
if( flags & AppConfig::APPLY_FLAG_MANUALLY_PROPAGATE )
|
||||
{
|
||||
|
@ -323,9 +325,9 @@ void Panels::CpuPanelVU::ApplyConfigToGui( AppConfig& configToApply, int flags )
|
|||
m_panel_VU1->SetSelection( recOps.EnableVU1 ? 1 : 0 );
|
||||
#endif
|
||||
|
||||
this->Enable(!configToApply.EnablePresets);
|
||||
m_panel_VU0->Enable(!configToApply.EnablePresets);
|
||||
m_panel_VU1->Enable(!configToApply.EnablePresets);
|
||||
m_button_RestoreDefaults->Enable(!configToApply.EnablePresets);
|
||||
|
||||
if ( flags & AppConfig::APPLY_FLAG_MANUALLY_PROPAGATE )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue