summaryrefslogtreecommitdiff
path: root/src/viewport.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-07-10 14:44:41 +0000
committerfrosch <frosch@openttd.org>2011-07-10 14:44:41 +0000
commitabf286e99048ac49f437569958c1c86c2203c7e0 (patch)
treee0c9cbeba845cd9b18608c5dbc2fb7be2a36aa0f /src/viewport.cpp
parent9afe1c1d20d3bc83ca5abc270cbd54dd39d66795 (diff)
downloadopenttd-abf286e99048ac49f437569958c1c86c2203c7e0.tar.xz
(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.
Diffstat (limited to 'src/viewport.cpp')
-rw-r--r--src/viewport.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/viewport.cpp b/src/viewport.cpp
index 1360064f5..16e6bb0b5 100644
--- a/src/viewport.cpp
+++ b/src/viewport.cpp
@@ -2859,6 +2859,9 @@ void SetObjectToPlace(CursorID icon, PaletteID pal, HighLightStyle mode, WindowC
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;