From 06232c58e97bd465e0149ef6a73633da306dd891 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 6 Sep 2014 17:50:45 +0300 Subject: fix textbox height if text is empty. --- src/gui/widgets/textbox.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/gui/widgets/textbox.cpp b/src/gui/widgets/textbox.cpp index d85f07b5d..37cf44135 100644 --- a/src/gui/widgets/textbox.cpp +++ b/src/gui/widgets/textbox.cpp @@ -229,6 +229,11 @@ void TextBox::setText(const std::string& text) mCaretRow = 0; mTextRows.clear(); + if (text.empty()) + { + adjustSize(); + return; + } size_t pos; size_t lastPos = 0; -- cgit v1.2.3-70-g09d2