summaryrefslogtreecommitdiff
path: root/src/order_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-12-08 17:18:51 +0000
committerfrosch <frosch@openttd.org>2012-12-08 17:18:51 +0000
commitb533523258dfd943caa307d28413693bcaa64007 (patch)
tree1236d0e560354d9b22d34269ba5ff99265a94cf6 /src/order_gui.cpp
parent18a5ba4ad7967c537854a3061df9e600c8f55bf7 (diff)
downloadopenttd-b533523258dfd943caa307d28413693bcaa64007.tar.xz
(svn r24801) -Codechange: Add functions to set integral DParams to suitable values for size computations.
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r--src/order_gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index f50ef73ed..85bd196ef 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -1097,7 +1097,7 @@ public:
if (widget != WID_O_ORDER_LIST) return;
bool rtl = _current_text_dir == TD_RTL;
- SetDParam(0, 99);
+ SetDParamMaxValue(0, this->vehicle->GetNumOrders(), 2);
int index_column_width = GetStringBoundingBox(STR_ORDER_INDEX).width + 2 * GetSpriteSize(rtl ? SPR_ARROW_RIGHT : SPR_ARROW_LEFT).width + 3;
int middle = rtl ? r.right - WD_FRAMETEXT_RIGHT - index_column_width : r.left + WD_FRAMETEXT_LEFT + index_column_width;