From 6e58b5f2fa6456990e54e3881e1dde07fdff8c7e Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 14 Mar 2021 09:49:26 +0100 Subject: [PATCH] Fixed an issue in ScrollableContainer where the reset animation played when it shouldn't. --- es-core/src/components/ScrollableContainer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/es-core/src/components/ScrollableContainer.cpp b/es-core/src/components/ScrollableContainer.cpp index af7f1b57f..ffad86046 100644 --- a/es-core/src/components/ScrollableContainer.cpp +++ b/es-core/src/components/ScrollableContainer.cpp @@ -113,7 +113,8 @@ void ScrollableContainer::update(int deltaTime) if (adjustedAutoScrollSpeed != 0) { mAutoScrollAccumulator += deltaTime; while (mAutoScrollAccumulator >= adjustedAutoScrollSpeed) { - mScrollPos += mScrollDir; + if (contentSize.y() > mSize.y()) + mScrollPos += mScrollDir; mAutoScrollAccumulator -= adjustedAutoScrollSpeed; } }