diff --git a/CHANGES.md b/CHANGES.md index 33750acfb4..23a8bf4023 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 a8551942dd..a87f4fbb5c 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