diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-06 17:50:45 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-06 17:50:45 +0300 |
commit | 06232c58e97bd465e0149ef6a73633da306dd891 (patch) | |
tree | 1ff339d3cd5f53c74c2092781d6cdf6c402ae8b1 /src/gui/widgets/textbox.cpp | |
parent | 2131a42c62c35c3b1876da1ac8dda967b93768e7 (diff) | |
download | plus-06232c58e97bd465e0149ef6a73633da306dd891.tar.gz plus-06232c58e97bd465e0149ef6a73633da306dd891.tar.bz2 plus-06232c58e97bd465e0149ef6a73633da306dd891.tar.xz plus-06232c58e97bd465e0149ef6a73633da306dd891.zip |
fix textbox height if text is empty.
Diffstat (limited to 'src/gui/widgets/textbox.cpp')
-rw-r--r-- | src/gui/widgets/textbox.cpp | 5 |
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; |