Codechange: Scrollbar::UpdatePosition() will tell if the position changed. (#10777)

So we don't need to check this manually.
pull/532/head
PeterN 1 year ago committed by GitHub
parent fb856e16c1
commit a836edd5a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save