From 59f9941445a8c50288d9dcdcd5ef593b19154b7e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 6 Sep 2005 22:57:37 +0000 Subject: [PATCH] Previously, theme metric lookups follows Fallback at every place; for example, if a base theme had: [Derived] Fallback=Base1 [Base1] A=1 and a derived theme had: [Derived] Fallback=Base2 [Base2] then the lookup "Derived", "A" would find 1. This is confusing and inconsistent: it means that the value of Derived::Fallback has two values, both Base1 and Base2, and Base1 is only accessible by the internal metric lookup. Every metric should have only one value; "Fallback=Base1" should be completely overridden here. (This also reduces the difference between theme lookups and path lookups; path lookups did not have this anomaly, as they did not have access to the extra Fallback value.) --- stepmania/src/ThemeManager.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stepmania/src/ThemeManager.cpp b/stepmania/src/ThemeManager.cpp index 8b56069e92..7fb5239ba3 100644 --- a/stepmania/src/ThemeManager.cpp +++ b/stepmania/src/ThemeManager.cpp @@ -584,17 +584,17 @@ bool ThemeManager::GetMetricRawRecursive( const CString &sClassName, const CStri if( level > 100 ) RageException::Throw("Infinite recursion looking up theme metric \"%s::%s\"", sClassName.c_str(), sValueName.c_str() ); - CString sFallback; - FOREACHD_CONST( Theme, g_vThemes, iter ) { if( iter->iniMetrics->GetValue(sClassName,sValueName,ret) ) return true; + } + + FOREACHD_CONST( Theme, g_vThemes, iter ) + { + CString sFallback; if( iter->iniMetrics->GetValue(sClassName,"Fallback",sFallback) ) - { - if( GetMetricRawRecursive(sFallback,sValueName,ret,level+1) ) - return true; - } + return GetMetricRawRecursive(sFallback,sValueName,ret,level+1); } return false;