Changeset - r28192:996c37140e28
[Not reviewed]
master
0 1 0
Peter Nelson - 12 months ago 2023-11-28 13:52:36
peter1138@openttd.org
Fix #10811: Allow dragging vehicle in depot to any free row. (#11508)
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/depot_gui.cpp
Show inline comments
 
@@ -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 */
0 comments (0 inline, 0 general)