GUI: Fix SaveLoadChooserGrid not disabling write protected slots

This was broken in commit f24a89e that disabled the slots when they
are locked due to cloud sync.
This commit is contained in:
Thierry Crozat 2020-09-12 21:41:57 +01:00
parent bdbbcd81ae
commit e0802ec341

View File

@ -1133,14 +1133,12 @@ void SaveLoadChooserGrid::updateSaves() {
// In save mode we disable the button, when it's write protected.
// TODO: Maybe we should not display it at all then?
if (_saveMode && desc.getWriteProtectedFlag()) {
// We also disable and description the button if slot is locked
if ((_saveMode && desc.getWriteProtectedFlag()) || desc.getLocked()) {
curButton.button->setEnabled(false);
} else {
curButton.button->setEnabled(true);
}
//that would make it look "disabled" if slot is locked
curButton.button->setEnabled(!desc.getLocked());
curButton.description->setEnabled(!desc.getLocked());
}