From f70dbfdc320094f2f8b006365403476c8378be03 Mon Sep 17 00:00:00 2001 From: Juanjo Date: Mon, 14 Oct 2013 17:55:30 +0000 Subject: [PATCH] Set selection tiles dirty when erasing a queued command. --- src/command.cpp | 4 +++- src/tilehighlight_func.h | 1 + src/viewport.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/command.cpp b/src/command.cpp index 9b965faab3..7dfc7529f2 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -27,6 +27,7 @@ #include "core/backup_type.hpp" #include "object_base.h" #include "string_func.h" +#include "tilehighlight_func.h" #include "table/strings.h" @@ -596,7 +597,8 @@ void EraseQueuedTouchCommand() _is_queued_command = false; extern void UpdateTouchscreenBar(); UpdateTouchscreenBar(); - //reset selection of tiles + SetSelectionTilesDirty(); + _thd.Reset(); } /*! diff --git a/src/tilehighlight_func.h b/src/tilehighlight_func.h index af44c4d88f..ac1567277b 100644 --- a/src/tilehighlight_func.h +++ b/src/tilehighlight_func.h @@ -30,6 +30,7 @@ void VpSetPresizeRange(TileIndex from, TileIndex to); void VpSetPlaceSizingLimit(int limit); void UpdateTileSelection(); +void SetSelectionTilesDirty(); extern TileHighlightData _thd; diff --git a/src/viewport.cpp b/src/viewport.cpp index d2e6f1b2c2..84aa495469 100644 --- a/src/viewport.cpp +++ b/src/viewport.cpp @@ -1717,7 +1717,7 @@ void MarkTileDirtyByTile(TileIndex tile) * * @ingroup dirty */ -static void SetSelectionTilesDirty() +void SetSelectionTilesDirty() { int x_size = _thd.size.x; int y_size = _thd.size.y;