AutoTest: Fix wrong caching of text layout

The text layout must get recalculated also when the width
of the underlying model index has changed.

Fixes: QTCREATORBUG-24236
Change-Id: I4ded56832c765320b6845cf35ad61453875dad50
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2020-07-01 15:50:34 +02:00
parent 3db5f4a2af
commit cd1a848e16
2 changed files with 4 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ private:
mutable QFont m_lastProcessedFont;
mutable QTextLayout m_lastCalculatedLayout;
mutable int m_lastCalculatedHeight;
mutable int m_lastWidth = -1;
class LayoutPositions
{