1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 17:19:09 +00:00

Fix: Filtered file list did not scroll properly. (#7402)

This commit is contained in:
2019-03-23 17:59:19 +00:00
committed by GitHub
parent d755375966
commit 4feea8db67

View File

@@ -437,12 +437,15 @@ public:
GfxFillRect(r.left + 1, r.top + 1, r.right, r.bottom, PC_BLACK); GfxFillRect(r.left + 1, r.top + 1, r.right, r.bottom, PC_BLACK);
uint y = r.top + WD_FRAMERECT_TOP; uint y = r.top + WD_FRAMERECT_TOP;
for (uint pos = this->vscroll->GetPosition(); pos < this->fios_items.Length(); pos++) { uint scroll_pos = this->vscroll->GetPosition();
if (!this->fios_items_shown[pos]) { for (uint row = 0; row < this->fios_items.Length(); row++) {
if (!this->fios_items_shown[row]) {
/* The current item is filtered out : we do not show it */ /* The current item is filtered out : we do not show it */
scroll_pos++;
continue; continue;
} }
const FiosItem *item = this->fios_items.Get(pos); if (row < scroll_pos) continue;
const FiosItem *item = this->fios_items.Get(row);
if (item == this->selected) { if (item == this->selected) {
GfxFillRect(r.left + 1, y, r.right, y + this->resize.step_height, PC_DARK_BLUE); GfxFillRect(r.left + 1, y, r.right, y + this->resize.step_height, PC_DARK_BLUE);