From d8a6abfb88b68f1aeb1f2545596138cf22909ac1 Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Thu, 21 Mar 2024 16:23:59 +0100 Subject: [PATCH] :bug: Fix image layer filter --- frontend/src/app/main/ui/workspace/sidebar/layers.cljs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/layers.cljs b/frontend/src/app/main/ui/workspace/sidebar/layers.cljs index 4ab174a38..debc36252 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/layers.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/layers.cljs @@ -10,6 +10,7 @@ [app.common.data :as d] [app.common.data.macros :as dm] [app.common.files.helpers :as cfh] + [app.common.types.shape :as cts] [app.common.uuid :as uuid] [app.main.data.workspace :as dw] [app.main.refs :as refs] @@ -147,7 +148,10 @@ (or (empty? filters) (and (contains? filters :component) (contains? shape :component-id)) - (let [direct-filters (into #{} (filter #{:frame :rect :circle :path :bool :image :text}) filters)] + (and (contains? filters :image) + (some? (cts/has-images? shape))) + + (let [direct-filters (into #{} (filter #{:frame :rect :circle :path :bool :text}) filters)] (contains? direct-filters (:type shape))) (and (contains? filters :group) (and (cfh/group-shape? shape) @@ -166,7 +170,6 @@ :filters #{} :num-items 100}) state (deref state*) - current-filters (:filters state) current-items (:num-items state) current-search (:search-text state)