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:
parent
ce2fc51914
commit
b6ce61f486
@ -746,6 +746,7 @@ void QTextEdit::setAlignment(Qt::Alignment a)
|
||||
QTextCursor cursor = d->control->textCursor();
|
||||
cursor.mergeBlockFormat(fmt);
|
||||
d->control->setTextCursor(cursor);
|
||||
d->relayoutDocument();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user