diff --git a/glue_solara/app.py b/glue_solara/app.py index e62e4df..a4f2ff5 100644 --- a/glue_solara/app.py +++ b/glue_solara/app.py @@ -309,7 +309,7 @@ def on_viewer_close(index: int): mdi_layouts.set(new_mdi_layouts) # Remove the viewer from grid layouts - new_grid_layout = grid_layout.value + new_grid_layout = copy.deepcopy(grid_layout.value) new_grid_layout.pop(index) # We need to update the indices of the viewers in the grid layout, otherwise we get placeholder elements for layout in new_grid_layout: