diff options
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtTextEdit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Swift/QtUI/QtTextEdit.cpp b/Swift/QtUI/QtTextEdit.cpp index f94d80d..9811bb2 100644 --- a/Swift/QtUI/QtTextEdit.cpp +++ b/Swift/QtUI/QtTextEdit.cpp @@ -40,8 +40,11 @@ void QtTextEdit::keyPressEvent(QKeyEvent* event) { } void QtTextEdit::handleTextChanged() { + QSize previous(maximumSize()); setMaximumSize(QSize(maximumWidth(), sizeHint().height())); - updateGeometry(); + if (previous != maximumSize()) { + updateGeometry(); + } } QSize QtTextEdit::sizeHint() const { |