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>
This commit is contained in:
Kari Hormi 2019-10-07 16:21:33 +03:00
parent ce2fc51914
commit b6ce61f486

View File

@ -746,6 +746,7 @@ void QTextEdit::setAlignment(Qt::Alignment a)
QTextCursor cursor = d->control->textCursor();
cursor.mergeBlockFormat(fmt);
d->control->setTextCursor(cursor);
d->relayoutDocument();
}
/*!