From 3a41aa61c58eb0b8f19e3210dc60d28b73002744 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 15 Sep 2022 17:29:34 +0200 Subject: [PATCH] Fixed an issue where a legacy theme workaround for incorrect element types did not work as expected. Also cleaned up a log warning message related to this. --- es-core/src/ThemeData.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/es-core/src/ThemeData.cpp b/es-core/src/ThemeData.cpp index 79d21f0f1..a3abfe423 100644 --- a/es-core/src/ThemeData.cpp +++ b/es-core/src/ThemeData.cpp @@ -531,9 +531,9 @@ const ThemeData::ThemeElement* ThemeData::getElement(const std::string& view, // If expectedType is an empty string, then skip type checking. if (elemIt->second.type != expectedType && !expectedType.empty()) { - LOG(LogWarning) << " requested mismatched theme type for [" << view << "." << element - << "] - expected \"" << expectedType << "\", got \"" << elemIt->second.type - << "\""; + LOG(LogWarning) << "ThemeData::getElement(): Requested element \"" << view << "." << element + << "\" has the wrong type, expected \"" << expectedType << "\", got \"" + << elemIt->second.type << "\""; return nullptr; } @@ -1176,7 +1176,7 @@ void ThemeData::parseElement(const pugi::xml_node& root, if (legacyWorkaround == LegacyWorkaround::DATETIME) element.type = "datetime"; - if (legacyWorkaround == LegacyWorkaround::TEXT) + else if (legacyWorkaround == LegacyWorkaround::TEXT) element.type = "text"; else if (legacyWorkaround == LegacyWorkaround::RATING) element.type = "rating";