mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
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.
This commit is contained in:
parent
8699bdcbb9
commit
3a41aa61c5
|
@ -531,9 +531,9 @@ const ThemeData::ThemeElement* ThemeData::getElement(const std::string& view,
|
||||||
|
|
||||||
// If expectedType is an empty string, then skip type checking.
|
// If expectedType is an empty string, then skip type checking.
|
||||||
if (elemIt->second.type != expectedType && !expectedType.empty()) {
|
if (elemIt->second.type != expectedType && !expectedType.empty()) {
|
||||||
LOG(LogWarning) << " requested mismatched theme type for [" << view << "." << element
|
LOG(LogWarning) << "ThemeData::getElement(): Requested element \"" << view << "." << element
|
||||||
<< "] - expected \"" << expectedType << "\", got \"" << elemIt->second.type
|
<< "\" has the wrong type, expected \"" << expectedType << "\", got \""
|
||||||
<< "\"";
|
<< elemIt->second.type << "\"";
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1176,7 +1176,7 @@ void ThemeData::parseElement(const pugi::xml_node& root,
|
||||||
|
|
||||||
if (legacyWorkaround == LegacyWorkaround::DATETIME)
|
if (legacyWorkaround == LegacyWorkaround::DATETIME)
|
||||||
element.type = "datetime";
|
element.type = "datetime";
|
||||||
if (legacyWorkaround == LegacyWorkaround::TEXT)
|
else if (legacyWorkaround == LegacyWorkaround::TEXT)
|
||||||
element.type = "text";
|
element.type = "text";
|
||||||
else if (legacyWorkaround == LegacyWorkaround::RATING)
|
else if (legacyWorkaround == LegacyWorkaround::RATING)
|
||||||
element.type = "rating";
|
element.type = "rating";
|
||||||
|
|
Loading…
Reference in a new issue