Merge pull request #33596 from KoBeWi/sell_tile

Make sure tile is selected when selecting TileMap
This commit is contained in:
Rémi Verschelde 2019-11-13 15:26:56 +01:00 committed by GitHub
commit 0132555dfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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))) {