Make sure tile is selected when selecting TileMap
(cherry picked from commit f7476359e0
)
This commit is contained in:
parent
7c67b1c9a2
commit
f161f7aa0b
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue