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;