🐛 Enable preprocess always when migrating files

This commit is contained in:
Andrés Moya 2024-01-08 12:26:07 +01:00 committed by Andrey Antukh
parent 3c114bd9ef
commit 790ce27316

View file

@ -383,12 +383,12 @@
(defn- migrate-components (defn- migrate-components
"If there is any component in the file library, add a new 'Library "If there is any component in the file library, add a new 'Library
backup', generate main instances for all components there and remove backup', generate main instances for all components there and remove
shapes from library components. Mark the file with shapes from library components. Mark the file with the :components-v2 option."
the :components-v2 option."
[file-data libraries] [file-data libraries]
(sse/tap {:type :migration-progress (sse/tap {:type :migration-progress
:section :components}) :section :components})
(let [components (ctkl/components-seq file-data)] (let [file-data (prepare-file-data file-data libraries)
components (ctkl/components-seq file-data)]
(if (empty? components) (if (empty? components)
(assoc-in file-data [:options :components-v2] true) (assoc-in file-data [:options :components-v2] true)
(let [[file-data page-id start-pos] (let [[file-data page-id start-pos]
@ -503,9 +503,7 @@
(some-> *team-stats* (swap! update :processed/components (fnil + 0) total)) (some-> *team-stats* (swap! update :processed/components (fnil + 0) total))
(some-> *file-stats* (swap! assoc :processed/components total))) (some-> *file-stats* (swap! assoc :processed/components total)))
(-> file-data (add-instance-grids file-data)))))
(prepare-file-data libraries)
(add-instance-grids))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; GRAPHICS MIGRATION ;; GRAPHICS MIGRATION