summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKari Hormi <kari.hormi@qt.io>2019-10-07 16:21:33 +0300
committerKari Hormi <kari.hormi@qt.io>2019-10-08 14:52:09 +0300
commitb6ce61f486a06ded273d518d871906f9a53ab7c1 (patch)
treee99268a6504cc089f47ae33e40d296ccf7baf3cf
parentce2fc51914f809369d5096e7a0621229dd9eaef9 (diff)
Fix text not rendering properly after setAlignment call
Sometimes when setAlignment is called, the text stops rendering correctly at some point. Adding relayoutDocument call to setAlignment fixes the problem. Fixes: QTBUG-78728 Change-Id: Iab1cf161f0c8d700804448733338c813b5bf9762 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
-rw-r--r--src/widgets/widgets/qtextedit.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index 0ae63f2dd5..2b3a46ae56 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -746,6 +746,7 @@ void QTextEdit::setAlignment(Qt::Alignment a)
QTextCursor cursor = d->control->textCursor();
cursor.mergeBlockFormat(fmt);
d->control->setTextCursor(cursor);
+ d->relayoutDocument();
}
/*!