From 1e1154b08c035f10602a0a7617725cfce7d3ac88 Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 8 Jun 2007 18:15:11 +0000 Subject: (svn r10068) -Fix [FS#835]: coverage area highlight was still show when it was turned off for docks. --- src/dock_gui.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/dock_gui.cpp') 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; -- cgit v1.2.3-70-g09d2