diff --git a/common/src/app/common/logic/shapes.cljc b/common/src/app/common/logic/shapes.cljc index 70c9b63fde..c49a445b2d 100644 --- a/common/src/app/common/logic/shapes.cljc +++ b/common/src/app/common/logic/shapes.cljc @@ -539,5 +539,12 @@ (update shape :interactions ctsi/add-interaction interaction)) (defn show-in-viewer + "Auto-unhide the shape in viewer when it becomes an interaction + destination, but only when the user has not explicitly hidden it. + Preserves explicit `:hide-in-viewer true` so that adding or updating + an interaction whose destination has been deliberately hidden does not + silently flip the viewer-visibility flag the user set. See #9049." [shape] - (dissoc shape :hide-in-viewer)) + (if (true? (:hide-in-viewer shape)) + shape + (dissoc shape :hide-in-viewer)))