From 2a30c233348f6f751ccba9eb9bdd582b77730aed Mon Sep 17 00:00:00 2001 From: Eva Date: Fri, 20 Jan 2023 11:15:14 +0100 Subject: [PATCH] :bug: Fix hidden shapes inside hidden group --- CHANGES.md | 1 + frontend/src/app/main/data/workspace/shapes.cljs | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 33750acfb..23a8bf402 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -46,6 +46,7 @@ - Fix justified text is stretched [Github #2539](https://github.com/penpot/penpot/issues/2539) - Fix mousewheel on viewer inspector [Taiga #4221](https://tree.taiga.io/project/penpot/issue/4221) - Fix path edition activated on boards [Taiga #4105](https://tree.taiga.io/project/penpot/issue/4105) +- Fix hidden layers inside groups become visible after the group visibility is changed[Taiga #4710](https://tree.taiga.io/project/penpot/issue/4710) ## 1.16.2-beta diff --git a/frontend/src/app/main/data/workspace/shapes.cljs b/frontend/src/app/main/data/workspace/shapes.cljs index a8551942d..a87f4fbb5 100644 --- a/frontend/src/app/main/data/workspace/shapes.cljs +++ b/frontend/src/app/main/data/workspace/shapes.cljs @@ -408,7 +408,11 @@ (boolean? blocked) (assoc :blocked blocked) (boolean? hidden) (assoc :hidden hidden))) objects (wsh/lookup-page-objects state) - ids (into ids (->> ids (mapcat #(cph/get-children-ids objects %))))] + ;; We have change only the hidden behaviour, to hide only the + ;; selected shape, block behaviour remains the same. + ids (if (boolean? blocked) + (into ids (->> ids (mapcat #(cph/get-children-ids objects %)))) + ids)] (rx/of (dch/update-shapes ids update-fn)))))) (defn toggle-visibility-selected