1
0
Fork 0

Fix: Drag drop line position when dragging NewGRF from file to active panel (#14316)

pull/14305/head
Jonathan G Rennison 2025-06-05 19:09:51 +01:00 committed by GitHub
parent 48764b0fed
commit 7dcc932d44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -863,7 +863,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
/* Get index of current selection. */
int active_sel_pos = this->GetCurrentActivePosition();
if (active_sel_pos != this->active_over) {
uint top = this->active_over < active_sel_pos ? tr.top + 1 : tr.top + step_height - 2;
uint top = (active_sel_pos < 0 || this->active_over < active_sel_pos) ? tr.top + 1 : tr.top + step_height - 2;
GfxFillRect(tr.left, top - 1, tr.right, top + 1, PC_GREY);
}
}