prevent falling back further than the base theme, even if it's renamed
This commit is contained in:
@@ -175,9 +175,6 @@ void ThemeManager::LoadThemeRecursive( deque<Theme> &theme, const CString &sThem
|
||||
depth++;
|
||||
ASSERT_M( depth < 20, "Circular theme fallback references detected." );
|
||||
|
||||
if( !sThemeName.CompareNoCase(BASE_THEME_NAME) )
|
||||
loaded_base = true;
|
||||
|
||||
Theme t;
|
||||
t.iniMetrics = new IniFile;
|
||||
t.sThemeName = sThemeName;
|
||||
@@ -186,6 +183,11 @@ void ThemeManager::LoadThemeRecursive( deque<Theme> &theme, const CString &sThem
|
||||
if( m_sCurLanguage.CompareNoCase(BASE_LANGUAGE) )
|
||||
t.iniMetrics->ReadFile( GetLanguageIniPath(sThemeName,m_sCurLanguage) );
|
||||
|
||||
bool bIsBaseTheme = !sThemeName.CompareNoCase(BASE_THEME_NAME);
|
||||
t.iniMetrics->GetValue( "Global", "IsBaseTheme", bIsBaseTheme );
|
||||
if( bIsBaseTheme )
|
||||
loaded_base = true;
|
||||
|
||||
/* Read the fallback theme. If no fallback theme is specified, and we havn't
|
||||
* already loaded it, fall back on BASE_THEME_NAME. That way, default theme
|
||||
* fallbacks can be disabled with "FallbackTheme=". */
|
||||
@@ -200,7 +202,7 @@ void ThemeManager::LoadThemeRecursive( deque<Theme> &theme, const CString &sThem
|
||||
|
||||
g_vThemes.push_front( t );
|
||||
|
||||
if( !sThemeName.CompareNoCase(sThemeName) )
|
||||
if( bIsBaseTheme )
|
||||
loaded_base = false;
|
||||
|
||||
depth--;
|
||||
|
||||
Reference in New Issue
Block a user