mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-28 17:09:10 +00:00
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.
This commit is contained in:
@@ -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()) {
|
||||
|
Reference in New Issue
Block a user