diff --git a/es-core/src/components/TextComponent.cpp b/es-core/src/components/TextComponent.cpp index be579fd3c..fcab0a511 100644 --- a/es-core/src/components/TextComponent.cpp +++ b/es-core/src/components/TextComponent.cpp @@ -240,6 +240,8 @@ void TextComponent::render(const glm::mat4& parentTrans) void TextComponent::onTextChanged() { + mTextCache.reset(); + if (!mVerticalAutoSizing) 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 (mTextCache != nullptr) - mTextCache.reset(); return; }