mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 18:40:29 +00:00
Codechange: Don't filter industry list by cargo type every 3-sec refresh.
The 3-sec refresh is to update the list sorting. The filter only needs to be applied once rebuilding the list.
This commit is contained in:
parent
4033750968
commit
6b9dc8cfcf
@ -1422,18 +1422,18 @@ protected:
|
||||
|
||||
this->industries.shrink_to_fit();
|
||||
this->industries.RebuildDone();
|
||||
|
||||
auto filter = std::make_pair(this->cargo_filter[this->accepted_cargo_filter_criteria],
|
||||
this->cargo_filter[this->produced_cargo_filter_criteria]);
|
||||
|
||||
this->industries.Filter(filter);
|
||||
|
||||
this->hscroll->SetCount(this->GetIndustryListWidth());
|
||||
}
|
||||
|
||||
auto filter = std::make_pair(this->cargo_filter[this->accepted_cargo_filter_criteria],
|
||||
this->cargo_filter[this->produced_cargo_filter_criteria]);
|
||||
|
||||
this->industries.Filter(filter);
|
||||
|
||||
IndustryDirectoryWindow::produced_cargo_filter = this->cargo_filter[this->produced_cargo_filter_criteria];
|
||||
this->industries.Sort();
|
||||
|
||||
this->vscroll->SetCount(this->industries.size()); // Update scrollbar as well.
|
||||
|
||||
this->SetDirty();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user