diff options
| author | Johannes Schickel | 2008-11-09 20:33:15 +0000 | 
|---|---|---|
| committer | Johannes Schickel | 2008-11-09 20:33:15 +0000 | 
| commit | bc829e721becf2e6b2ecdb1e963c4d2ccbe0701c (patch) | |
| tree | 41395eea9019f3c6f1259b67a852db97dc22d5d5 /gui | |
| parent | 818d87f44897d6ede9b201282ca89ced278150a4 (diff) | |
| download | scummvm-rg350-bc829e721becf2e6b2ecdb1e963c4d2ccbe0701c.tar.gz scummvm-rg350-bc829e721becf2e6b2ecdb1e963c4d2ccbe0701c.tar.bz2 scummvm-rg350-bc829e721becf2e6b2ecdb1e963c4d2ccbe0701c.zip | |
Cleanup (and a little bug fix :-P).
svn-id: r34975
Diffstat (limited to 'gui')
| -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())); | 
