63 lines
1.6 KiB
Diff
63 lines
1.6 KiB
Diff
From 824f296d4c9faa9e6a50806270241e90f2a69c8a Mon Sep 17 00:00:00 2001
|
|
From: Juanjo <juanjo.ng.83@gmail.com>
|
|
Date: Mon, 14 Oct 2013 17:55:30 +0000
|
|
Subject: [PATCH 231/249] 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 53aeac1..02720ce 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"
|
|
|
|
@@ -602,7 +603,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 af44c4d..ac15672 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 81a9dca..95aecf3 100644
|
|
--- a/src/viewport.cpp
|
|
+++ b/src/viewport.cpp
|
|
@@ -1766,7 +1766,7 @@ void MarkTileDirtyByTile(TileIndex tile)
|
|
*
|
|
* @ingroup dirty
|
|
*/
|
|
-static void SetSelectionTilesDirty()
|
|
+void SetSelectionTilesDirty()
|
|
{
|
|
int x_size = _thd.size.x;
|
|
int y_size = _thd.size.y;
|
|
--
|
|
1.8.1.2
|
|
|