1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

Merge pull request #112349 from kleonc/tile_set_editor_paint_terrain_pick_crash

Fix TileSet editor crash on terrain pick in paint mode
This commit is contained in:
Thaddeus Crews
2025-11-03 17:49:36 -06:00
3 changed files with 6 additions and 1 deletions

View File

@@ -1887,7 +1887,7 @@ void TileDataTerrainsEditor::_update_terrain_selector() {
// Kind of a hack to set icons.
// We could provide a way to modify that in the EditorProperty.
OptionButton *option_button = Object::cast_to<OptionButton>(terrain_property_editor->get_child(0));
OptionButton *option_button = terrain_property_editor->get_option_button();
for (int terrain = 0; terrain < tile_set->get_terrains_count(terrain_set); terrain++) {
option_button->set_item_icon(terrain + 1, icons[terrain_set][terrain]);
}