m_maxHeight = fHeight;
m_textWidth = 0;
m_textHeight = 0;
+ m_lastUpdateW = false;
}
void CGUITextLayout::SetWrap(bool bWrap)
bool CGUITextLayout::Update(const CStdString &text, float maxWidth, bool forceUpdate /*= false*/, bool forceLTRReadingOrder /*= false*/)
{
- if (text == m_lastUtf8Text && !forceUpdate)
+ if (text == m_lastUtf8Text && !forceUpdate && !m_lastUpdateW)
return false;
m_lastUtf8Text = text;
+ m_lastUpdateW = false;
CStdStringW utf16;
utf8ToW(text, utf16);
UpdateCommon(utf16, maxWidth, forceLTRReadingOrder);
bool CGUITextLayout::UpdateW(const CStdStringW &text, float maxWidth /*= 0*/, bool forceUpdate /*= false*/, bool forceLTRReadingOrder /*= false*/)
{
- if (text == m_lastText && !forceUpdate)
+ if (text == m_lastText && !forceUpdate && m_lastUpdateW)
return false;
m_lastText = text;
+ m_lastUpdateW = true;
UpdateCommon(text, maxWidth, forceLTRReadingOrder);
return true;
}