From 5f10a913d4c62a475218b4062b34fd0269b313df Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:11:56 +0200 Subject: [PATCH] Fix manual mode when the tilemap is empty. --- src/Classes/Cels/CelTileMap.gd | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Classes/Cels/CelTileMap.gd b/src/Classes/Cels/CelTileMap.gd index ac776c12b..8e7638420 100644 --- a/src/Classes/Cels/CelTileMap.gd +++ b/src/Classes/Cels/CelTileMap.gd @@ -352,10 +352,11 @@ func update_texture(undo := false) -> void: var rect := Rect2i(coords, tileset.tile_size) var image_portion := image.get_region(rect) var current_tile := tileset.tiles[index] - if index == 0 and tileset.tiles.size() > 1: - # Prevent from drawing on empty image portions. - var tile_size := current_tile.image.get_size() - image.blit_rect(current_tile.image, Rect2i(Vector2i.ZERO, tile_size), coords) + if index == 0: + if tileset.tiles.size() > 1: + # Prevent from drawing on empty image portions. + var tile_size := current_tile.image.get_size() + image.blit_rect(current_tile.image, Rect2i(Vector2i.ZERO, tile_size), coords) continue if editing_images.has(index): var editing_portion := editing_images[index][0] as int