Merge pull request #29461 from YeldhamDev/tilemapeditor_search_errorspam_fix

Fix error spam when typing in the TileMap editor's search box while having no results
This commit is contained in:
Rémi Verschelde 2019-06-04 08:41:50 +02:00 committed by GitHub
commit bdbf2e818c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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