From bc829e721becf2e6b2ecdb1e963c4d2ccbe0701c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 9 Nov 2008 20:33:15 +0000 Subject: Cleanup (and a little bug fix :-P). svn-id: r34975 --- gui/launcher.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'gui') 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())); -- cgit v1.2.3