mirror of
https://github.com/penpot/penpot.git
synced 2025-01-26 08:29:42 -05:00
🐛 Selected colors do not appear in the color palette
This commit is contained in:
parent
8a63089773
commit
9ca1535a65
1 changed files with 7 additions and 3 deletions
|
@ -609,9 +609,13 @@
|
||||||
(assoc :type :color))))))))
|
(assoc :type :color))))))))
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state _]
|
(watch [_ state _]
|
||||||
;; Type can be null, because the colorpicker can be closed while a color image finish its upload
|
(let [selected-type (-> state
|
||||||
(when (and add-recent? (some? (:type state)))
|
:colorpicker
|
||||||
(let [formated-color (get-color-from-colorpicker-state (:colorpicker state))]
|
:type)
|
||||||
|
formated-color (get-color-from-colorpicker-state (:colorpicker state))
|
||||||
|
;; Type is set to color on closing the colorpicker, but we can can close it while still uploading an image fill
|
||||||
|
ignore-color? (and (= selected-type :color) (nil? (:color formated-color)))]
|
||||||
|
(when (and add-recent? (not ignore-color?))
|
||||||
(rx/of (dwl/add-recent-color formated-color)))))))
|
(rx/of (dwl/add-recent-color formated-color)))))))
|
||||||
|
|
||||||
(defn update-colorpicker-gradient
|
(defn update-colorpicker-gradient
|
||||||
|
|
Loading…
Add table
Reference in a new issue