mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-29 19:55:37 +00:00
Fixed an issue where text caches would not get cleared if the text was set to a blank value.
This commit is contained in:
parent
27936131f3
commit
e1d911f401
|
@ -263,8 +263,11 @@ void TextComponent::onTextChanged()
|
|||
return;
|
||||
}
|
||||
|
||||
if (!mFont || text.empty() || mSize.x < 0.0f)
|
||||
if (!mFont || text.empty() || mSize.x < 0.0f) {
|
||||
if (mTextCache != nullptr)
|
||||
mTextCache.reset();
|
||||
return;
|
||||
}
|
||||
|
||||
float lineHeight {0.0f};
|
||||
const bool isScrollable {mParent && mParent->isScrollable()};
|
||||
|
|
Loading…
Reference in a new issue