From 2d3d22025a5f278ffa350fd6d69dd8bb0dab59eb Mon Sep 17 00:00:00 2001 From: CedricMocquillon Date: Fri, 4 Dec 2020 22:28:36 +0100 Subject: [PATCH] Avoid height for empty message in AutoSizedTextBox --- components/widgets/box.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/widgets/box.cpp b/components/widgets/box.cpp index 23a108ee9..3e8f62b4b 100644 --- a/components/widgets/box.cpp +++ b/components/widgets/box.cpp @@ -32,7 +32,7 @@ namespace Gui MyGUI::IntSize AutoSizedTextBox::getRequestedSize() { - return getTextSize(); + return getCaption().empty() ? MyGUI::IntSize{0, 0} : getTextSize(); } void AutoSizedTextBox::setCaption(const MyGUI::UString& _value)