mirror of
https://github.com/penpot/penpot.git
synced 2025-05-10 10:16:37 +02:00
🐛 Improve selection of near copies to sync
This commit is contained in:
parent
7dd0745429
commit
c5f24331a3
3 changed files with 49 additions and 16 deletions
|
@ -599,15 +599,10 @@
|
|||
library (dm/get-in libraries [(:component-file shape-inst) :data])
|
||||
component (or (ctkl/get-component library (:component-id shape-inst))
|
||||
(and reset?
|
||||
(ctkl/get-deleted-component library (:component-id shape-inst))))
|
||||
component-shape (ctn/get-component-shape (:objects container) shape-inst)]
|
||||
(ctkl/get-deleted-component library (:component-id shape-inst))))]
|
||||
(if (and (ctk/in-component-copy? shape-inst)
|
||||
(or (= (:id component) (:component-id component-shape)) reset?)) ; In a normal sync, we don't want to sync remote mains, only near
|
||||
(or (ctf/direct-copy? shape-inst component container nil libraries) reset?)) ; In a normal sync, we don't want to sync remote mains, only direct/near
|
||||
(let [redirect-shaperef (partial redirect-shaperef container libraries)
|
||||
library (dm/get-in libraries [(:component-file shape-inst) :data])
|
||||
component (or (ctkl/get-component library (:component-id shape-inst))
|
||||
(and reset?
|
||||
(ctkl/get-deleted-component library (:component-id shape-inst))))
|
||||
|
||||
shape-main (when component
|
||||
(if (and reset? components-v2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue