mirror of
https://github.com/penpot/penpot.git
synced 2025-03-15 17:21:17 -05:00
🐛 Fix touched erroneously set after a text component sync
This commit is contained in:
parent
8772e51bd2
commit
0b316d6828
2 changed files with 9 additions and 4 deletions
|
@ -51,8 +51,8 @@
|
|||
|
||||
(defn update-shapes
|
||||
([ids update-fn] (update-shapes ids update-fn nil))
|
||||
([ids update-fn {:keys [reg-objects? save-undo? stack-undo? attrs ignore-tree page-id ignore-remote?]
|
||||
:or {reg-objects? false save-undo? true stack-undo? false ignore-remote? false}}]
|
||||
([ids update-fn {:keys [reg-objects? save-undo? stack-undo? attrs ignore-tree page-id ignore-remote? ignore-touched]
|
||||
:or {reg-objects? false save-undo? true stack-undo? false ignore-remote? false ignore-touched false}}]
|
||||
(dm/assert! (sm/coll-of-uuid? ids))
|
||||
(dm/assert! (fn? update-fn))
|
||||
|
||||
|
@ -71,7 +71,9 @@
|
|||
|
||||
changes (reduce
|
||||
(fn [changes id]
|
||||
(let [opts {:attrs attrs :ignore-geometry? (get ignore-tree id)}]
|
||||
(let [opts {:attrs attrs
|
||||
:ignore-geometry? (get ignore-tree id)
|
||||
:ignore-touched ignore-touched}]
|
||||
(pcb/update-shapes changes [id] update-fn (d/without-nils opts))))
|
||||
(-> (pcb/empty-changes it page-id)
|
||||
(pcb/set-save-undo? save-undo?)
|
||||
|
|
|
@ -426,7 +426,10 @@
|
|||
|
||||
(let [ids (->> (keys props) (filter changed-text?))]
|
||||
(rx/of (dwu/start-undo-transaction undo-id)
|
||||
(dch/update-shapes ids update-fn {:reg-objects? true :stack-undo? true :ignore-remote? true})
|
||||
(dch/update-shapes ids update-fn {:reg-objects? true
|
||||
:stack-undo? true
|
||||
:ignore-remote? true
|
||||
:ignore-touched true})
|
||||
(ptk/data-event :layout/update ids)
|
||||
(dwu/commit-undo-transaction undo-id))))))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue