Fixed an issue where the camera offset in ComponentList was not correctly calculated when reaching the bottom of a list

This commit is contained in:
Leon Styhre 2023-07-29 11:27:12 +02:00
parent 0d18239893
commit 2d151921db

View file

@ -250,7 +250,7 @@ void ComponentList::updateCameraOffset()
unsigned int i {0}; unsigned int i {0};
while (mCameraOffset < target && i < mEntries.size()) { while (mCameraOffset < target && i < mEntries.size()) {
mCameraOffset += mRowHeight; mCameraOffset += mRowHeight;
if (mCameraOffset > totalHeight - mSize.y) { if (mCameraOffset >= totalHeight - mSize.y) {
if (mSetupCompleted) { if (mSetupCompleted) {
if (mScrollIndicatorStatus == ComponentList::SCROLL_NONE && if (mScrollIndicatorStatus == ComponentList::SCROLL_NONE &&
oldCameraOffset == 0.0f) oldCameraOffset == 0.0f)