diff options
author | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-06-04 01:44:38 -0300 |
---|---|---|
committer | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2019-06-04 01:44:38 -0300 |
commit | 412a0b73e9291b10a89780014c66947a2588ea85 (patch) | |
tree | b7f753237b9299237f95fb4a92ffbce59298ed76 | |
parent | 774a9fde84a0282c40da1dd891b613ed200ff9a8 (diff) |
Fix error spam when typing in the TileMap editor's search box while having no results
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 4ef2d17128..7aa3d69bfa 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -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); } |