From e96cbc52f9fdb03deebfe0efbaccfccba4034591 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 5 Mar 2023 17:37:24 +0100 Subject: [PATCH] Carousel fastScrolling is now disabled if there are less than three entries. --- es-core/src/components/IList.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/es-core/src/components/IList.h b/es-core/src/components/IList.h index 09ecb870c..1f85a5bab 100644 --- a/es-core/src/components/IList.h +++ b/es-core/src/components/IList.h @@ -292,7 +292,10 @@ protected: while (mScrollTier < mTierList.count - 1 && mScrollTierAccumulator >= mTierList.tiers[mScrollTier].length) { mScrollTierAccumulator -= mTierList.tiers[mScrollTier].length; - ++mScrollTier; + // This is required for the carousel as the highest tier introduces weird behavior + // if there are only two entries. + if (!(mScrollTier > 0 && mEntries.size() < 3)) + ++mScrollTier; } // Actually perform the scrolling.