From 0d7468e9b4f879f81381f61b1cbc8d610605603e Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 31 Oct 2022 21:50:54 +0100 Subject: [PATCH] Moved the color scheme parsing even earlier to prevent potential issues. --- es-core/src/ThemeData.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/es-core/src/ThemeData.cpp b/es-core/src/ThemeData.cpp index 56b4c4067..151fa4441 100644 --- a/es-core/src/ThemeData.cpp +++ b/es-core/src/ThemeData.cpp @@ -494,6 +494,9 @@ void ThemeData::loadFile(const std::map& sysDataMap, } parseVariables(root); + if (!mLegacyTheme) + parseColorSchemes(root); + parseIncludes(root); parseViews(root); // For non-legacy themes this will simply check for the presence of a feature tag and throw @@ -501,7 +504,6 @@ void ThemeData::loadFile(const std::map& sysDataMap, parseFeatures(root); if (!mLegacyTheme) { - parseColorSchemes(root); parseVariants(root); parseAspectRatios(root); } @@ -1012,6 +1014,9 @@ void ThemeData::parseIncludes(const pugi::xml_node& root) throw error << ": Missing tag"; parseVariables(theme); + if (!mLegacyTheme) + parseColorSchemes(theme); + parseIncludes(theme); parseViews(theme); // For non-legacy themes this will simply check for the presence of a feature tag and throw @@ -1019,7 +1024,6 @@ void ThemeData::parseIncludes(const pugi::xml_node& root) parseFeatures(theme); if (!mLegacyTheme) { - parseColorSchemes(theme); parseVariants(theme); parseAspectRatios(theme); } @@ -1123,9 +1127,8 @@ void ThemeData::parseColorSchemes(const pugi::xml_node& root) << "\" is not defined in capabilities.xml"; } - if (mSelectedColorScheme == viewKey) { + if (mSelectedColorScheme == viewKey) parseVariables(node); - } } } }