mirror of https://github.com/OpenTTD/OpenTTD
Fix #8024: make online content gui more responsive while loading
Previously the internal content list was invalidated and sorted for every new item added. Now the sorting is delayed until the GUI is drawn, which means we only sort once per GUI tick. Since the amount of incoming items per GUI tick is not controlled by the GUI but rather by network speed, we were previously doing a lot of duplicate work per tick, causing the mouse cursor to lag while the list was initialized.pull/8287/head
parent
89c8215b79
commit
f4ed770cff
|
@ -951,7 +951,7 @@ public:
|
|||
{
|
||||
if (this->auto_select && !rci->IsSelected()) _network_content_client.ToggleSelectedState(rci);
|
||||
this->content.ForceRebuild();
|
||||
this->InvalidateData();
|
||||
this->InvalidateData(0, false);
|
||||
}
|
||||
|
||||
void OnDownloadComplete(ContentID cid) override
|
||||
|
|
Loading…
Reference in New Issue