Fixed an issue where the wrong scroll indicator could be shown.

This commit is contained in:
Leon Styhre 2021-10-24 12:10:38 +02:00
parent 5c4d0821e2
commit 5247a9f5fe

View file

@ -249,8 +249,16 @@ void ComponentList::updateCameraOffset()
while (mCameraOffset < target && i < mEntries.size()) {
mCameraOffset += getRowHeight(mEntries.at(i).data);
if (mCameraOffset > totalHeight - mSize.y) {
if (mSetupCompleted && mCameraOffset != oldCameraOffset)
mBottomCameraOffset = true;
if (mSetupCompleted) {
if (mScrollIndicatorStatus == ComponentList::SCROLL_NONE &&
oldCameraOffset == 0.0f)
break;
if (mScrollIndicatorStatus != ComponentList::SCROLL_NONE &&
oldCameraOffset == 0.0f)
mBottomCameraOffset = true;
else if (mCameraOffset != oldCameraOffset)
mBottomCameraOffset = true;
}
break;
}
i++;