summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorAndreas Haas <liu.gam3@gmail.com>2017-08-03 20:44:15 +0200
committerAndreas Haas <liu.gam3@gmail.com>2017-08-03 20:46:13 +0200
commit95da12212beb6ab947de5ebbb0d12ffba3d2006c (patch)
tree679cea4241d50496e4a9e970c002300e6dab198e /editor
parent3ccf0968ffc1230c92474979a8974cc001c6086a (diff)
TileMap: Fix infinite loop when trying to bucket-delete empty tiles.
Right-clicking when the bucket tool is enabled means "erase all instances of this tile". So it doesn't make sense to try doing this for empty tiles :P Fixes #10065
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index d12b979121..e7bc8a4dab 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -330,6 +330,8 @@ PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i &p_start, bool era
if (id == TileMap::INVALID_CELL)
return PoolVector<Vector2>();
+ } else if (prev_id == TileMap::INVALID_CELL) {
+ return PoolVector<Vector2>();
}
Rect2i r = node->get_item_rect();