gui: speedhacks: disable restore-defaults when Presets is used

The Restore-Defaults button and the Presets checkbox are inherently conflicting
since both of them apply (different) sets of values to the speed hacks, however
the Preset also applies values to other panels.

Now the relation between the Defaults button and Preset is consistent with
other panels (EE/VU) where Defaults already got disabled when Presets is used.

Before this patch (and also before the previous one which fixed the locking),
clicking restore-defaults while Presets was checked resulted in incorrect state
where Preset is checked but the speed hacks are both unlocked and also didn't
necessarily match the selected preset. Now this can't happen.
This commit is contained in:
Avi Halachmi (:avih) 2015-05-16 23:27:06 +03:00
parent bbf7153acd
commit 3bd3ba4faf
1 changed files with 2 additions and 1 deletions

View File

@ -248,8 +248,9 @@ void Panels::SpeedHacksPanel::EnableStuff( AppConfig* configToUse )
bool hacksEnabled = configToUse->EnableSpeedHacks;
bool HacksEnabledAndNoPreset = hacksEnabled && !hasPreset;
// Main checkbox - locked only if presets are enabled
// Main checkbox and Restore-defaults - locked only if presets are enabled
m_check_Enable->Enable(!hasPreset);
m_button_Defaults->Enable(!hasPreset);
// lock/unlock the slider panels rather than the sliders themselves
// in order to affect both sliders and texts