src/depot_gui.cpp
changeset 9324 bf9cc84b889d
parent 9280 9c03416d26b1
child 10222 b6919c94cc77
--- a/src/depot_gui.cpp	Sat Apr 05 10:55:50 2008 +0000
+++ b/src/depot_gui.cpp	Sat Apr 05 11:27:50 2008 +0000
@@ -441,6 +441,7 @@
 				WP(w, depot_d).sel = v->index;
 				SetWindowDirty(w);
 				SetObjectToPlaceWnd(image, GetVehiclePalette(v), VHM_DRAG, w);
+				_cursor.vehchain = _ctrl_pressed;
 			}
 			}
 			break;
@@ -957,6 +958,7 @@
 					WP(w, depot_d).sel = INVALID_VEHICLE;
 					SetWindowDirty(w);
 			}
+			_cursor.vehchain = false;
 			break;
 
 		case WE_RESIZE:
@@ -965,6 +967,13 @@
 			w->widget[DEPOT_WIDGET_MATRIX].data = (w->vscroll.cap << 8) + (WP(w, depot_d).type == VEH_TRAIN ? 1 : w->hscroll.cap);
 			ResizeDepotButtons(w);
 			break;
+
+		case WE_CTRL_CHANGED:
+			if (WP(w, depot_d).sel != INVALID_VEHICLE) {
+				_cursor.vehchain = _ctrl_pressed;
+				w->InvalidateWidget(DEPOT_WIDGET_MATRIX);
+			}
+			break;
 	}
 }