diff options
Diffstat (limited to 'gui/launcher.cpp')
-rw-r--r-- | gui/launcher.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 761cf0082f..897f85f25d 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -714,9 +714,16 @@ void SaveLoadChooser::updateSelection(bool redraw) { } - // Disable these buttons if nothing is selected, or if an empty - // list item is selected. - _chooseButton->setEnabled(selItem >= 0 && ((!_list->getSelectedString().empty())) || (_list->isEditable() && !isWriteProtected)); + if (_list->isEditable()) { + // Disable the save button if nothing is selected, or if the selected + // game is write protected + _chooseButton->setEnabled(selItem >= 0 && !isWriteProtected); + } else { + // Disable the load button if nothing is selected, or if an empty + // list item is selected. + _chooseButton->setEnabled(selItem >= 0 && !_list->getSelectedString().empty()); + } + // Delete will always be disabled if the engine doesn't support it. _deleteButton->setEnabled(isDeletable && (selItem >= 0) && (!_list->getSelectedString().empty())); |