From a97b08e87eca1f7aaaeeb059dc85704ec8466e59 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 13 Jan 2021 19:49:35 +0100 Subject: [PATCH] Eliminated some unnecessary processing in TextComponent. --- es-core/src/components/TextComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/es-core/src/components/TextComponent.cpp b/es-core/src/components/TextComponent.cpp index 5224965fb..0231faae1 100644 --- a/es-core/src/components/TextComponent.cpp +++ b/es-core/src/components/TextComponent.cpp @@ -229,7 +229,7 @@ void TextComponent::onTextChanged() } Vector2f size = f->sizeText(text); - if (!isMultiline && mSize.x() && text.size() && (size.x() > mSize.x() || addAbbrev)) { + if (!isMultiline && mSize.x() > 0.0f && text.size() && (size.x() > mSize.x() || addAbbrev)) { // Abbreviate text. const std::string abbrev = "..."; Vector2f abbrevSize = f->sizeText(abbrev);