summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-08-20 11:39:55 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-08-20 11:39:55 (GMT)
commitecd62de51a5dbca99481720e274737241236e170 (patch)
tree8d55a3ec2743ec8d4fe59031d18b363224d26db7
parentcd21e4aba3f26b8c6bde360c6ebb12cbc1ee5ed2 (diff)
downloadswift-contrib-ecd62de51a5dbca99481720e274737241236e170.zip
swift-contrib-ecd62de51a5dbca99481720e274737241236e170.tar.bz2
Cause fewer geometry updates while typing in chat windows.
-rw-r--r--Swift/QtUI/QtTextEdit.cpp5
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 {