From 99d9c0df482ff98b7224a8611a4d6e92fd2d0914 Mon Sep 17 00:00:00 2001 From: John Obelenus Date: Fri, 20 Dec 2024 14:20:39 -0500 Subject: [PATCH] Fix: ensure z-index for frames when deleting/updating/adding components --- app/web/src/store/views.store.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/web/src/store/views.store.ts b/app/web/src/store/views.store.ts index 2b2aba9264..bcbc4df0fd 100644 --- a/app/web/src/store/views.store.ts +++ b/app/web/src/store/views.store.ts @@ -829,6 +829,7 @@ export const useViewsStore = (forceChangeSetId?: ChangeSetId) => { groups, views, }); + this.setGroupZIndex(); this.selectView(response.view.id); }, }); @@ -1747,9 +1748,9 @@ export const useViewsStore = (forceChangeSetId?: ChangeSetId) => { size: finalGeo.width * finalGeo.height, zIndex: 0, }; - this.setGroupZIndex(); } }); + this.setGroupZIndex(); if (this.selectedComponentId === data.component.id) { if (data.component.changeStatus !== "deleted") @@ -1778,6 +1779,7 @@ export const useViewsStore = (forceChangeSetId?: ChangeSetId) => { delete view?.components[data.componentId]; delete view?.groups[data.componentId]; }); + this.setGroupZIndex(); // remove invalid component IDs from the selection const validComponentIds = _.intersection(