summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-09-03 22:39:02 +0000
committerDarkvater <darkvater@openttd.org>2006-09-03 22:39:02 +0000
commitf5bda65b05328177340b843127ac05d79f3c33ea (patch)
tree99b7d09f300e1419ec5a28cd6a5bec2e50c77b3e
parentde610df608a5e87f1bcde3c0e7e660457a44296f (diff)
downloadopenttd-f5bda65b05328177340b843127ac05d79f3c33ea.tar.xz
(svn r6368) -Fix [FS#136]: Station catchment area persists after switching tools. The
correct fix was to reset the highlight box if any size changes (grimrc)
-rw-r--r--dock_gui.c6
-rw-r--r--viewport.c4
2 files changed, 4 insertions, 6 deletions
diff --git a/dock_gui.c b/dock_gui.c
index aa51caeb0..6f3c556d0 100644
--- a/dock_gui.c
+++ b/dock_gui.c
@@ -233,11 +233,7 @@ static void BuildDockStationWndProc(Window *w, WindowEvent *e)
rad = (_patches.modified_catchment) ? CA_DOCK : 4;
- if (_station_show_coverage) {
- SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
- } else {
- SetTileSelectBigSize(0, 0, 0, 0);
- }
+ if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
DrawStationCoverageAreaText(4, 50, (uint)-1, rad);
break;
diff --git a/viewport.c b/viewport.c
index 1f522ab7a..f6ff534f7 100644
--- a/viewport.c
+++ b/viewport.c
@@ -1894,7 +1894,9 @@ void UpdateTileSelection(void)
// redraw selection
if (_thd.drawstyle != _thd.new_drawstyle ||
_thd.pos.x != _thd.new_pos.x || _thd.pos.y != _thd.new_pos.y ||
- _thd.size.x != _thd.new_size.x || _thd.size.y != _thd.new_size.y) {
+ _thd.size.x != _thd.new_size.x || _thd.size.y != _thd.new_size.y ||
+ _thd.outersize.x != _thd.new_outersize.x ||
+ _thd.outersize.y != _thd.new_outersize.y) {
// clear the old selection?
if (_thd.drawstyle) SetSelectionTilesDirty();