summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-10-24 09:47:02 +0000
committerrubidium <rubidium@openttd.org>2009-10-24 09:47:02 +0000
commit2f41c0411c270388efefb9bfa8dd7ecf1cf5b10b (patch)
treea449e9f822d676407437b8f6ebdc24fc6459ab48 /src/vehicle_gui.cpp
parentd5a3ec1996cb70624395dd642a6ccc410856a18e (diff)
downloadopenttd-2f41c0411c270388efefb9bfa8dd7ecf1cf5b10b.tar.xz
(svn r17850) -Codechange: remove most usage of delta on OnResize
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index f2cb72cd5..5b258f5b4 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -1498,8 +1498,7 @@ struct VehicleDetailsWindow : Window {
virtual void OnResize(Point delta)
{
- if (delta.x != 0) ResizeButtons(this, VLD_WIDGET_DETAILS_CARGO_CARRIED, VLD_WIDGET_DETAILS_TOTAL_CARGO);
- if (delta.y == 0) return;
+ ResizeButtons(this, VLD_WIDGET_DETAILS_CARGO_CARRIED, VLD_WIDGET_DETAILS_TOTAL_CARGO);
this->vscroll.SetCapacity((this->widget[VLD_WIDGET_MIDDLE_DETAILS].bottom - this->widget[VLD_WIDGET_MIDDLE_DETAILS].top + 1) / 14);
this->widget[VLD_WIDGET_MIDDLE_DETAILS].data = (this->vscroll.GetCapacity() << MAT_ROW_START) + (1 << MAT_COL_START);