Commit e3c6f397 authored by Eskil Abrahamsen Blomfeldt's avatar Eskil Abrahamsen Blomfeldt
Browse files

Relayout rich text when width increases


In updateSize() we were trying to force relayouts for RichText
when the width changes by always setting widthExceeded to true.
But further down in the same function, we overwrote this
with textWidth() < idealWidth(), which doesn't work, because
both properties are the wrapped width of the document and
should only differ if the text cannot be wrapped properly.

The result was that when increasing the width of a Text element,
we would hit the optimization and skip the relayout.

[ChangeLog][Text] Fixed Text with the RichText format to
correctly update wrapping when the width of the element grows.

Change-Id: I5fd87052a5ba7e8ee2549be0cfac4adc8ddf8290
Task-number: QTBUG-33020
Reviewed-by: default avatarSimon Hausmann <simon.hausmann@digia.com>
parent 0fc6e4b2
No related merge requests found
Showing with 29 additions and 1 deletion
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment