(svn r10068) -Fix [FS#835]: coverage area highlight was still show when it was turned off for docks.
authorrubidium
Fri, 08 Jun 2007 18:15:11 +0000
changeset 7325 e49df6ba88e7
parent 7324 c1ef383b5d12
child 7326 290fdfc54179
(svn r10068) -Fix [FS#835]: coverage area highlight was still show when it was turned off for docks.
src/dock_gui.cpp
--- a/src/dock_gui.cpp	Fri Jun 08 17:54:48 2007 +0000
+++ b/src/dock_gui.cpp	Fri Jun 08 18:15:11 2007 +0000
@@ -235,14 +235,16 @@
 	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;