Make QTextEngine::setAdditionalFormats() invalidate cached results
...which ensures we're not getting the formatting/rendering artefacts in case of QStackTextEngine. Change-Id: Ia0696a3e67eb866cf9776c6649c43775944edd1d Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
parent
946c092554
commit
4f2872c64f
@ -2374,6 +2374,7 @@ void QTextEngine::freeMemory()
|
||||
layoutData->hasBidi = false;
|
||||
layoutData->layoutState = LayoutEmpty;
|
||||
layoutData->haveCharAttributes = false;
|
||||
layoutData->items.clear();
|
||||
}
|
||||
for (int i = 0; i < lines.size(); ++i) {
|
||||
lines[i].justified = 0;
|
||||
@ -2520,7 +2521,8 @@ void QTextEngine::setAdditionalFormats(const QList<QTextLayout::FormatRange> &fo
|
||||
specialData->addFormats = formatList;
|
||||
indexAdditionalFormats();
|
||||
}
|
||||
resetFontEngineCache();
|
||||
invalidate();
|
||||
clearLineData();
|
||||
}
|
||||
|
||||
void QTextEngine::indexAdditionalFormats()
|
||||
|
Loading…
Reference in New Issue
Block a user