mirror of https://github.com/OpenTTD/OpenTTD
Fix: Drag drop line position when dragging NewGRF from file to active panel (#14316)
parent
48764b0fed
commit
7dcc932d44
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue