Make sure tile is selected when selecting TileMap

(cherry picked from commit f7476359e0)
This commit is contained in:
Tomasz Chabora 2019-11-13 14:25:50 +01:00 committed by Rémi Verschelde
parent 7c67b1c9a2
commit f161f7aa0b
1 changed files with 1 additions and 0 deletions

View File

@ -474,6 +474,7 @@ void TileMapEditor::_update_palette() {
sel_tile = selected.get(Math::rand() % selected.size()); sel_tile = selected.get(Math::rand() % selected.size());
} else if (palette->get_item_count() > 0) { } else if (palette->get_item_count() > 0) {
palette->select(0); palette->select(0);
sel_tile = palette->get_selected_items().get(0);
} }
if (sel_tile != TileMap::INVALID_CELL) { if (sel_tile != TileMap::INVALID_CELL) {