summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qlayoutitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp
index 5c4fc20687..52640daf55 100644
--- a/src/widgets/kernel/qlayoutitem.cpp
+++ b/src/widgets/kernel/qlayoutitem.cpp
@@ -839,7 +839,7 @@ int QWidgetItemV2::heightForWidth(int width) const
const QSize &size = q_cachedHfws[offset % HfwCacheMaxSize];
if (size.width() == width) {
if (q_hfwCacheSize == HfwCacheMaxSize)
- q_firstCachedHfw = offset;
+ q_firstCachedHfw = offset % HfwCacheMaxSize;
return size.height();
}
}