summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2015-02-01 19:40:04 +0000
committerfrosch <frosch@openttd.org>2015-02-01 19:40:04 +0000
commit3bc7ee3ab731c7a855f811b36356ed907b42989a (patch)
tree2e227f6346bb89093317393e089eb2a96795810c
parent6fceaeee40394a9f1cd50149346cc6009989cb9c (diff)
downloadopenttd-3bc7ee3ab731c7a855f811b36356ed907b42989a.tar.xz
(svn r27133) -Fix: Dragging of free wagons in depot failed with GUI zoom.
-rw-r--r--src/depot_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp
index feceeda93..946f35ad8 100644
--- a/src/depot_gui.cpp
+++ b/src/depot_gui.cpp
@@ -429,7 +429,7 @@ struct DepotWindow : Window {
pos -= this->vehicle_list.Length();
*veh = this->wagon_list[pos];
/* free wagons don't have an initial loco. */
- x -= VEHICLEINFO_FULL_VEHICLE_WIDTH;
+ x -= UnScaleByZoom(VEHICLEINFO_FULL_VEHICLE_WIDTH * ZOOM_LVL_BASE, ZOOM_LVL_GUI);
wagon = true;
}
@@ -669,7 +669,7 @@ struct DepotWindow : Window {
/* determine amount of items for scroller */
if (this->type == VEH_TRAIN) {
- uint max_width = VEHICLEINFO_FULL_VEHICLE_WIDTH;
+ uint max_width = UnScaleByZoom(VEHICLEINFO_FULL_VEHICLE_WIDTH * ZOOM_LVL_BASE, ZOOM_LVL_GUI);
for (uint num = 0; num < this->vehicle_list.Length(); num++) {
uint width = 0;
for (const Train *v = Train::From(this->vehicle_list[num]); v != NULL; v = v->Next()) {