mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-13 02:52:37 +00:00
Codechange: Scrollbar::UpdatePosition() will tell if the position changed. (#10777)
So we don't need to check this manually.
This commit is contained in:
parent
fb856e16c1
commit
a836edd5a7
@ -280,14 +280,9 @@ struct DropdownWindow : Window {
|
||||
IntervalTimer<TimerWindow> scroll_interval = {std::chrono::milliseconds(30), [this](auto) {
|
||||
if (this->scrolling == 0) return;
|
||||
|
||||
int pos = this->vscroll->GetPosition();
|
||||
if (this->vscroll->UpdatePosition(this->scrolling)) this->SetDirty();
|
||||
|
||||
this->vscroll->UpdatePosition(this->scrolling);
|
||||
this->scrolling = 0;
|
||||
|
||||
if (pos != this->vscroll->GetPosition()) {
|
||||
this->SetDirty();
|
||||
}
|
||||
}};
|
||||
|
||||
void OnMouseLoop() override
|
||||
|
Loading…
Reference in New Issue
Block a user