Skip to content

Commit fda61f2

Browse files
committed
Fix demo when switching layout without any method selected.
1 parent f27e698 commit fda61f2

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.changeset/every-coats-pay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hexagon-tile-map-layer": patch
3+
---
4+
5+
Fix demo when switching layout without any method selected.

addons/hexagon_tilemaplayer/demo/left_menu.gd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ func switch_to_tilemap(new_tile_map: HexagonTileMapLayer):
5353
_on_enable_pathfinding_toggled(button_enable_pathfinding.button_pressed)
5454
update_debug_mode()
5555
_on_tile_layout_selected(old_layout)
56-
methods_tree.set_selected(old_method, 0)
56+
if old_method:
57+
methods_tree.set_selected(old_method, 0)
5758

5859

5960
func _on_tile_layout_selected(index: int) -> void:

0 commit comments

Comments
 (0)