summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-06-03 00:23:54 +0000
committersmatz <smatz@openttd.org>2008-06-03 00:23:54 +0000
commit00851610e1e64d8b5e759c425bfd4ddbf8f504ee (patch)
tree24ba87837dba140d33f5ce5278b964362f802d34 /src
parentdef3177d3a4504424639501e92bf778fd809d0ba (diff)
downloadopenttd-00851610e1e64d8b5e759c425bfd4ddbf8f504ee.tar.xz
(svn r13366) -Fix: clicking in the Subsidies window was broken
Diffstat (limited to 'src')
-rw-r--r--src/subsidy_gui.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp
index d8b39dbc2..76cbf58b4 100644
--- a/src/subsidy_gui.cpp
+++ b/src/subsidy_gui.cpp
@@ -37,23 +37,29 @@ struct SubsidyListWindow : Window {
for (const Subsidy *s = _subsidies; s != endof(_subsidies); s++) {
if (s->cargo_type != CT_INVALID && s->age < 12) {
y -= 10;
- if (y < 0) this->HandleClick(s);
+ if (y < 0) {
+ this->HandleClick(s);
+ return;
+ }
num++;
}
}
if (num == 0) {
- y -= 10;
+ y -= 10; /* "None" */
if (y < 0) return;
}
- y -= 11;
+ y -= 11; /* "Services already subsidised:" */
if (y < 0) return;
for (const Subsidy *s = _subsidies; s != endof(_subsidies); s++) {
if (s->cargo_type != CT_INVALID && s->age >= 12) {
y -= 10;
- if (y < 0) this->HandleClick(s);
+ if (y < 0) {
+ this->HandleClick(s);
+ return;
+ }
}
}
}