summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-11-10 21:53:11 +0100
committerGitHub <noreply@github.com>2018-11-10 21:53:11 +0100
commitf2873e5d0674dc9697debf6450a714c8c719c860 (patch)
treea16cfb8abba8d52471329345cf06751bb71915f6
parent2c0a2fbda3ac931e2051a3fbbe0c6a701fef8251 (diff)
parentb6c386a3b03bfab2cd18c297cae59f2abe6b91a0 (diff)
Merge pull request #23638 from DualMatrix/tileset_spam
Fixed error spam when deleting cell in tileset
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index 635813f4b2..213cd2ce1a 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -300,7 +300,7 @@ void TileMapEditor::_set_cell(const Point2i &p_pos, Vector<int> p_values, bool p
}
node->set_cell(p_pos.x, p_pos.y, p_value, p_flip_h, p_flip_v, p_transpose);
- if (manual_autotile || node->get_tileset()->tile_get_tile_mode(p_value) == TileSet::ATLAS_TILE) {
+ if (manual_autotile || (p_value != -1 && node->get_tileset()->tile_get_tile_mode(p_value) == TileSet::ATLAS_TILE)) {
if (current != -1) {
node->set_cell_autotile_coord(p_pos.x, p_pos.y, position);
}