diff options
author | Johannes Schickel | 2009-08-20 10:04:21 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-08-20 10:04:21 +0000 |
commit | f898cd12e664af159e2d337fb8c8a0f9f976e1d9 (patch) | |
tree | c6fcc496c9dab75f9c7aeca75f869baea5dd3c52 /gui/saveload.cpp | |
parent | 8b0a10ad75e585ca7b5cae79467c6faf0bcc1917 (diff) | |
download | scummvm-rg350-f898cd12e664af159e2d337fb8c8a0f9f976e1d9.tar.gz scummvm-rg350-f898cd12e664af159e2d337fb8c8a0f9f976e1d9.tar.bz2 scummvm-rg350-f898cd12e664af159e2d337fb8c8a0f9f976e1d9.zip |
Implement automatic clearing of "Untitled Savestate" in edit mode of the SaveLoadChooser as requested in feature request #2834637 "GUI: Allow greying out dummy ListWidget entries".
svn-id: r43555
Diffstat (limited to 'gui/saveload.cpp')
-rw-r--r-- | gui/saveload.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 381abcdc83..058911d43f 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -278,8 +278,15 @@ void SaveLoadChooser::updateSelection(bool redraw) { // game is write protected _chooseButton->setEnabled(selItem >= 0 && !isWriteProtected); - if (startEditMode) + if (startEditMode) { _list->startEditMode(); + + if (_chooseButton->isEnabled() && _list->getSelectedString() == "Untitled savestate" && + _list->getSelectionColor() == ThemeEngine::kFontColorAlternate) { + _list->setEditString(""); + _list->setEditColor(ThemeEngine::kFontColorNormal); + } + } } else { // Disable the load button if nothing is selected, or if an empty // list item is selected. |