mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Eliminated some unnecessary processing in TextComponent.
This commit is contained in:
parent
34e10ec319
commit
a97b08e87e
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue