mirror of
https://github.com/penpot/penpot.git
synced 2025-02-25 00:06:09 -05:00
🐛 Properly deselect all shapes on posible error on saving.
This commit is contained in:
parent
4ee1f9cf2c
commit
5c1290d5b3
2 changed files with 9 additions and 2 deletions
|
@ -526,7 +526,6 @@
|
|||
|
||||
(defn get-shape-layer-position
|
||||
[objects selected attrs]
|
||||
|
||||
(cond
|
||||
(= :frame (:type attrs))
|
||||
[uuid/zero uuid/zero nil]
|
||||
|
@ -594,6 +593,7 @@
|
|||
(-> attrs
|
||||
(assoc :id id )
|
||||
(assoc :name name)))]
|
||||
|
||||
(rx/concat
|
||||
(rx/of (commit-changes rchanges uchanges {:commit-local? true})
|
||||
(select-shapes (d/ordered-set id)))
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
[app.main.data.workspace.common :as dwc]
|
||||
[app.main.data.workspace.svg-upload :as svg]
|
||||
[app.main.data.workspace.libraries :as dwl]
|
||||
[app.main.data.workspace.selection :as dws]
|
||||
[app.main.repo :as rp]
|
||||
[app.main.store :as st]
|
||||
[app.util.i18n :as i18n :refer [tr]]
|
||||
|
@ -134,7 +135,13 @@
|
|||
(if (or (= :bad-gateway type)
|
||||
(= :service-unavailable type))
|
||||
(rx/of (update-persistence-status {:status :error :reason type}))
|
||||
(rx/throw error)))]
|
||||
(rx/concat
|
||||
(rx/of update-persistence-queue)
|
||||
(rx/of (update-persistence-status {:status :error :reason type}))
|
||||
(rx/of (dws/deselect-all))
|
||||
(->> (rx/of nil)
|
||||
(rx/delay 200)
|
||||
(rx/mapcat #(rx/throw error))))))]
|
||||
|
||||
(when (= file-id (:id file))
|
||||
(->> (rp/mutation :update-file params)
|
||||
|
|
Loading…
Add table
Reference in a new issue