summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-06 17:50:45 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 17:50:45 +0300
commit06232c58e97bd465e0149ef6a73633da306dd891 (patch)
tree1ff339d3cd5f53c74c2092781d6cdf6c402ae8b1 /src
parent2131a42c62c35c3b1876da1ac8dda967b93768e7 (diff)
downloadmanaplus-06232c58e97bd465e0149ef6a73633da306dd891.tar.gz
manaplus-06232c58e97bd465e0149ef6a73633da306dd891.tar.bz2
manaplus-06232c58e97bd465e0149ef6a73633da306dd891.tar.xz
manaplus-06232c58e97bd465e0149ef6a73633da306dd891.zip
fix textbox height if text is empty.
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/textbox.cpp5
1 files changed, 5 insertions, 0 deletions
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;