mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-10 08:00:05 +00:00
parent
e6d132d24b
commit
e3924f3231
@ -460,11 +460,9 @@ struct DepotWindow : Window {
|
||||
ym = (y - matrix_widget->pos_y) % this->resize.step_height;
|
||||
|
||||
int row = this->vscroll->GetScrolledRowFromWidget(y, this, WID_D_MATRIX);
|
||||
if (row == INT_MAX) return MODE_ERROR;
|
||||
|
||||
uint pos = (row * this->num_columns) + xt;
|
||||
|
||||
if (this->vehicle_list.size() + this->wagon_list.size() <= pos) {
|
||||
if (row == INT_MAX || this->vehicle_list.size() + this->wagon_list.size() <= pos) {
|
||||
/* Clicking on 'line' / 'block' without a vehicle */
|
||||
if (this->type == VEH_TRAIN) {
|
||||
/* End the dragging */
|
||||
|
Loading…
Reference in New Issue
Block a user