diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-08-20 11:39:55 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-08-20 11:39:55 (GMT) |
commit | ecd62de51a5dbca99481720e274737241236e170 (patch) | |
tree | 8d55a3ec2743ec8d4fe59031d18b363224d26db7 | |
parent | cd21e4aba3f26b8c6bde360c6ebb12cbc1ee5ed2 (diff) | |
download | swift-ecd62de51a5dbca99481720e274737241236e170.zip swift-ecd62de51a5dbca99481720e274737241236e170.tar.bz2 |
Cause fewer geometry updates while typing in chat windows.
-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 { |