aboutsummaryrefslogtreecommitdiff
path: root/gui/saveload.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2009-08-20 10:04:21 +0000
committerJohannes Schickel2009-08-20 10:04:21 +0000
commitf898cd12e664af159e2d337fb8c8a0f9f976e1d9 (patch)
treec6fcc496c9dab75f9c7aeca75f869baea5dd3c52 /gui/saveload.cpp
parent8b0a10ad75e585ca7b5cae79467c6faf0bcc1917 (diff)
downloadscummvm-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.cpp9
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.