From 36bd82ceb485ca5ae2dea337720fc79080d8b611 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 13 Apr 2023 10:34:22 +0200 Subject: [PATCH] :bug: Fix first level board "Show in view mode" is automatically unchecked --- CHANGES.md | 3 +++ frontend/src/app/main/data/workspace/shapes.cljs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index ff3eec4c0..47c8c35a9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,7 +2,10 @@ ## 1.18.2 +### :bug: Bugs fixed + - Fix problem with frame title rotation +- Fix first level board "Show in view mode" is automatically unchecked [Taiga #5136](https://tree.taiga.io/project/penpot/issue/5136) ## 1.18.1 diff --git a/frontend/src/app/main/data/workspace/shapes.cljs b/frontend/src/app/main/data/workspace/shapes.cljs index ea0f38a09..f0cb2757b 100644 --- a/frontend/src/app/main/data/workspace/shapes.cljs +++ b/frontend/src/app/main/data/workspace/shapes.cljs @@ -137,7 +137,9 @@ (pcb/with-objects objects) (cond-> (not (ctl/any-layout? objects frame-id)) (pcb/update-shapes ordered-indexes ctl/remove-layout-item-data)) - (pcb/update-shapes ordered-indexes #(cond-> % (cph/frame-shape? %) (assoc :hide-in-viewer true))) + (pcb/update-shapes ordered-indexes #(cond-> % + (and (cph/frame-shape? %) (not= (:parent-id %) uuid/zero)) + (assoc :hide-in-viewer true))) (pcb/change-parent frame-id to-move-shapes 0) (cond-> (ctl/grid-layout? objects frame-id) (pcb/update-shapes [frame-id] ctl/assign-cells))))]