mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 08:05:38 +00:00
The text cache is now always reset on text changes.
This commit is contained in:
parent
3ead13ad29
commit
b426473ec0
|
@ -240,6 +240,8 @@ void TextComponent::render(const glm::mat4& parentTrans)
|
||||||
|
|
||||||
void TextComponent::onTextChanged()
|
void TextComponent::onTextChanged()
|
||||||
{
|
{
|
||||||
|
mTextCache.reset();
|
||||||
|
|
||||||
if (!mVerticalAutoSizing)
|
if (!mVerticalAutoSizing)
|
||||||
mVerticalAutoSizing = (mSize.x != 0.0f && mSize.y == 0.0f);
|
mVerticalAutoSizing = (mSize.x != 0.0f && mSize.y == 0.0f);
|
||||||
|
|
||||||
|
@ -264,8 +266,6 @@ void TextComponent::onTextChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mFont || text.empty() || mSize.x < 0.0f) {
|
if (!mFont || text.empty() || mSize.x < 0.0f) {
|
||||||
if (mTextCache != nullptr)
|
|
||||||
mTextCache.reset();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue