Fix CSSLength not setting proper unit type

core4
nimetu 3 years ago
parent d2376f0203
commit 7878e13602

@ -69,7 +69,11 @@ bool CSSLength::parseValue(const std::string &value, bool allowPercent, bool all
if (knownUnits.count(unit)) if (knownUnits.count(unit))
{ {
std::string tmpstr = value.substr(0, pos); std::string tmpstr = value.substr(0, pos);
return fromString(tmpstr, m_Value); if (fromString(tmpstr, m_Value))
{
setUnit(unit);
return true;
}
} }
return false; return false;

Loading…
Cancel
Save