From f161f7aa0b3a49569ae4f80e5a67eeece8358cd2 Mon Sep 17 00:00:00 2001 From: Tomasz Chabora Date: Wed, 13 Nov 2019 14:25:50 +0100 Subject: [PATCH] Make sure tile is selected when selecting TileMap (cherry picked from commit f7476359e0bac2c7741b443010827030b8545ea3) --- editor/plugins/tile_map_editor_plugin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index bb3b829dc0d..99d1a85391e 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -474,6 +474,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) {