changeset 17858:caa80a1af715 draft

(svn r22649) -Fix [FS#4670]: Switching from a red to a white highlight (by switching to another tool) without switching the highlight mode (HT_RECT etc.) did not mark the selection dirty.
author frosch <frosch@openttd.org>
date Sun, 10 Jul 2011 14:44:41 +0000
parents 79ef73bc37d5
children d6f85eb5ec53
files src/viewport.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2859,6 +2859,9 @@
 		if (w != NULL) w->OnPlaceObjectAbort();
 	}
 
+	/* Mark the old selection dirty, in case the selection shape or colour changes */
+	if ((_thd.drawstyle & HT_DRAG_MASK) != HT_NONE) SetSelectionTilesDirty();
+
 	SetTileSelectSize(1, 1);
 
 	_thd.make_square_red = false;