summaryrefslogtreecommitdiff
path: root/src/dock_gui.cpp
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
commit1e1154b08c035f10602a0a7617725cfce7d3ac88 (patch)
tree3eaf4bfdaa4d579ce965e75fe4e2feeb4173f7ce /src/dock_gui.cpp
parent4f445aad221c48202b155a26ef2453b55e25f914 (diff)
downloadopenttd-1e1154b08c035f10602a0a7617725cfce7d3ac88.tar.xz
(svn r10068) -Fix [FS#835]: coverage area highlight was still show when it was turned off for docks.
Diffstat (limited to 'src/dock_gui.cpp')
-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;