mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-11 11:45:21 +00:00
Theme selection dialog now automatically selects the currently active theme. Fixes bug #2706967.
svn-id: r39703
This commit is contained in:
parent
e5e1615280
commit
053b7b8a9b
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user