Compare commits

...

2 Commits

Author SHA1 Message Date
Peter Nelson 0b2819ec83
Merge a66b4f33d1 into a6d401debf 2024-04-26 09:56:03 -07:00
Peter Nelson a66b4f33d1
Fix: Scrollbar scrolls to wrong position for current position.
Scrollbar::ScrollTowards() incorrectly scrolls downwards if the current position is the same as the request position, so that the position is no longer visible.
2024-04-26 12:35:44 +01:00
1 changed files with 1 additions and 1 deletions

View File

@ -839,7 +839,7 @@ public:
*/
void ScrollTowards(size_type position)
{
if (position < this->GetPosition()) {
if (position <= this->GetPosition()) {
/* scroll up to the item */
this->SetPosition(position);
} else if (position >= this->GetPosition() + this->GetCapacity()) {