From 2634f8dd7cf72a3c190d9e2f45529712bf72fc16 Mon Sep 17 00:00:00 2001 From: Variable Date: Tue, 26 Nov 2024 01:23:10 +0500 Subject: [PATCH] fix second grid not *shown* removed when first grid has default values. --- src/Autoload/Global.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Autoload/Global.gd b/src/Autoload/Global.gd index 01c288bba..38c854a14 100644 --- a/src/Autoload/Global.gd +++ b/src/Autoload/Global.gd @@ -752,7 +752,11 @@ func _ready() -> void: func update_grids(grids_data: Dictionary): + # Remove old grids grids.clear() + if is_instance_valid(Global.canvas.grid): + Global.canvas.grid.queue_redraw() + # ADD new ones for grid_idx in grids_data.size(): Grid.new(grids_data[grid_idx]) # gets auto added to grids array