mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 13:16:13 +02:00
🐛 Fix problem when undoing multiple selected colors
This commit is contained in:
parent
475ce08d3e
commit
05e13ad05f
2 changed files with 14 additions and 9 deletions
|
@ -17,8 +17,8 @@
|
||||||
|
|
||||||
- Fix problem with rules position on changing pages [Taiga #4847](https://tree.taiga.io/project/penpot/issue/4847)
|
- Fix problem with rules position on changing pages [Taiga #4847](https://tree.taiga.io/project/penpot/issue/4847)
|
||||||
- Fix error streen when uploading wrong SVG [#2995](https://github.com/penpot/penpot/issues/2995)
|
- Fix error streen when uploading wrong SVG [#2995](https://github.com/penpot/penpot/issues/2995)
|
||||||
- Fix error streen when uploading wrong SVG [#2995](https://github.com/penpot/penpot/issues/2995)
|
|
||||||
- Fix selecting children from hidden parent layers [Taiga #4934](https://tree.taiga.io/project/penpot/issue/4934)
|
- Fix selecting children from hidden parent layers [Taiga #4934](https://tree.taiga.io/project/penpot/issue/4934)
|
||||||
|
- Fix problem when undoing multiple selected colors [Taiga #4920](https://tree.taiga.io/project/penpot/issue/4920)
|
||||||
|
|
||||||
### :arrow_up: Deps updates
|
### :arrow_up: Deps updates
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
[app.main.data.workspace.libraries :as dwl]
|
[app.main.data.workspace.libraries :as dwl]
|
||||||
[app.main.data.workspace.state-helpers :as wsh]
|
[app.main.data.workspace.state-helpers :as wsh]
|
||||||
[app.main.data.workspace.texts :as dwt]
|
[app.main.data.workspace.texts :as dwt]
|
||||||
|
[app.main.data.workspace.undo :as dwu]
|
||||||
[app.util.color :as uc]
|
[app.util.color :as uc]
|
||||||
[beicon.core :as rx]
|
[beicon.core :as rx]
|
||||||
[potok.core :as ptk]))
|
[potok.core :as ptk]))
|
||||||
|
@ -350,6 +351,9 @@
|
||||||
(ptk/reify ::change-color-in-selected
|
(ptk/reify ::change-color-in-selected
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ _ _]
|
(watch [_ _ _]
|
||||||
|
(let [undo-id (js/Symbol)]
|
||||||
|
(rx/concat
|
||||||
|
(rx/of (dwu/start-undo-transaction undo-id))
|
||||||
(->> (rx/from shapes-by-color)
|
(->> (rx/from shapes-by-color)
|
||||||
(rx/map (fn [shape] (case (:prop shape)
|
(rx/map (fn [shape] (case (:prop shape)
|
||||||
:fill (change-fill [(:shape-id shape)] new-color (:index shape))
|
:fill (change-fill [(:shape-id shape)] new-color (:index shape))
|
||||||
|
@ -357,7 +361,8 @@
|
||||||
:shadow (change-shadow [(:shape-id shape)] new-color (:index shape))
|
:shadow (change-shadow [(:shape-id shape)] new-color (:index shape))
|
||||||
:content (dwt/update-text-with-function
|
:content (dwt/update-text-with-function
|
||||||
(:shape-id shape)
|
(:shape-id shape)
|
||||||
(partial change-text-color old-color new-color (:index shape))))))))))
|
(partial change-text-color old-color new-color (:index shape)))))))
|
||||||
|
(rx/of (dwu/commit-undo-transaction undo-id)))))))
|
||||||
|
|
||||||
(defn apply-color-from-palette
|
(defn apply-color-from-palette
|
||||||
[color is-alt?]
|
[color is-alt?]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue