From ecd62de51a5dbca99481720e274737241236e170 Mon Sep 17 00:00:00 2001 From: Kevin Smith <git@kismith.co.uk> Date: Fri, 20 Aug 2010 12:39:55 +0100 Subject: Cause fewer geometry updates while typing in chat windows. 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 { -- cgit v0.10.2-6-g49f6