aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorVicent Marti2009-03-26 20:24:16 +0000
committerVicent Marti2009-03-26 20:24:16 +0000
commit053b7b8a9b9105f5b94df485c74d537366caeff6 (patch)
treec57e4114bcb60e165332e1e80924ee423ff11aa9 /gui
parente5e16152808bfc44681a5ea217685fb474339064 (diff)
downloadscummvm-rg350-053b7b8a9b9105f5b94df485c74d537366caeff6.tar.gz
scummvm-rg350-053b7b8a9b9105f5b94df485c74d537366caeff6.tar.bz2
scummvm-rg350-053b7b8a9b9105f5b94df485c74d537366caeff6.zip
Theme selection dialog now automatically selects the currently active theme. Fixes bug #2706967.
svn-id: r39703
Diffstat (limited to 'gui')
-rw-r--r--gui/themebrowser.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/gui/themebrowser.cpp b/gui/themebrowser.cpp
index d20320ad3e..f5dfd5950c 100644
--- a/gui/themebrowser.cpp
+++ b/gui/themebrowser.cpp
@@ -97,12 +97,20 @@ void ThemeBrowser::updateListing() {
ThemeEngine::listUsableThemes(_themes);
+ const Common::String currentThemeId = g_gui.theme()->getThemeId();
+ int currentThemeIndex = 0, index = 0;
+
Common::StringList list;
- for (ThemeDescList::const_iterator i = _themes.begin(); i != _themes.end(); ++i)
+ for (ThemeDescList::const_iterator i = _themes.begin(); i != _themes.end(); ++i, ++index) {
list.push_back(i->name);
+ if (i->id == currentThemeId)
+ currentThemeIndex = index;
+ }
+
_fileList->setList(list);
_fileList->scrollTo(0);
+ _fileList->setSelected(currentThemeIndex);
// Finally, redraw
draw();