summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-06-08 18:15:11 +0000
committerrubidium <rubidium@openttd.org>2007-06-08 18:15:11 +0000
commit5b972a1d58e7b2df8f395746835b1b243539cf7d (patch)
tree3eaf4bfdaa4d579ce965e75fe4e2feeb4173f7ce
parent18d1638e533a9574fae6607578ccc5aa27be0cc2 (diff)
downloadopenttd-5b972a1d58e7b2df8f395746835b1b243539cf7d.tar.xz
(svn r10068) -Fix [FS#835]: coverage area highlight was still show when it was turned off for docks.
-rw-r--r--src/dock_gui.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp
index 57b3bcb57..aad7bae54 100644
--- a/src/dock_gui.cpp
+++ b/src/dock_gui.cpp
@@ -235,14 +235,16 @@ static void BuildDockStationWndProc(Window *w, WindowEvent *e)
case WE_CREATE: LowerWindowWidget(w, _station_show_coverage + 3); break;
case WE_PAINT: {
- int rad;
+ int rad = (_patches.modified_catchment) ? CA_DOCK : 4;
if (WP(w, def_d).close) return;
DrawWindowWidgets(w);
- rad = (_patches.modified_catchment) ? CA_DOCK : 4;
-
- if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
+ if (_station_show_coverage) {
+ SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
+ } else {
+ SetTileSelectSize(1, 1);
+ }
DrawStationCoverageAreaText(4, 50, (uint)-1, rad);
break;