summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-11-13 15:26:56 +0100
committerGitHub <noreply@github.com>2019-11-13 15:26:56 +0100
commit0132555dfa7d07e81aae5c2f879f9374ade562cd (patch)
tree5d97004fd99b9c7728192df53911f227009cda7c
parentd3a852f1241306eb697c0e2c072aa9bda09a4f7c (diff)
parentf7476359e0bac2c7741b443010827030b8545ea3 (diff)
Merge pull request #33596 from KoBeWi/sell_tile
Make sure tile is selected when selecting TileMap
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index 10567557d6..385ba4cfda 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -515,6 +515,7 @@ void TileMapEditor::_update_palette() {
sel_tile = selected.get(Math::rand() % selected.size());
} else if (palette->get_item_count() > 0) {
palette->select(0);
+ sel_tile = palette->get_selected_items().get(0);
}
if (sel_tile != TileMap::INVALID_CELL && ((manual_autotile && tileset->tile_get_tile_mode(sel_tile) == TileSet::AUTO_TILE) || (!priority_atlastile && tileset->tile_get_tile_mode(sel_tile) == TileSet::ATLAS_TILE))) {