mirror of
https://github.com/penpot/penpot.git
synced 2026-08-25 06:08:47 +00:00
Merge pull request #6312 from penpot/elenatorro-fix-children-removal-regression
🐛 Fix last shape removal
This commit is contained in:
commit
25950bb5a5
@ -190,8 +190,8 @@
|
|||||||
(defn set-shape-children
|
(defn set-shape-children
|
||||||
[shape-ids]
|
[shape-ids]
|
||||||
(let [num-shapes (count shape-ids)]
|
(let [num-shapes (count shape-ids)]
|
||||||
|
(perf/begin-measure "set-shape-children")
|
||||||
(when (> num-shapes 0)
|
(when (> num-shapes 0)
|
||||||
(perf/begin-measure "set-shape-children")
|
|
||||||
(let [offset (mem/alloc-bytes (* CHILD-ENTRY-SIZE num-shapes))
|
(let [offset (mem/alloc-bytes (* CHILD-ENTRY-SIZE num-shapes))
|
||||||
heap (mem/get-heap-u32)]
|
heap (mem/get-heap-u32)]
|
||||||
|
|
||||||
@ -200,11 +200,11 @@
|
|||||||
(when-not (empty? entries)
|
(when-not (empty? entries)
|
||||||
(let [id (first entries)]
|
(let [id (first entries)]
|
||||||
(sr/heapu32-set-uuid id heap (mem/ptr8->ptr32 current-offset))
|
(sr/heapu32-set-uuid id heap (mem/ptr8->ptr32 current-offset))
|
||||||
(recur (rest entries) (+ current-offset CHILD-ENTRY-SIZE)))))
|
(recur (rest entries) (+ current-offset CHILD-ENTRY-SIZE)))))))
|
||||||
|
|
||||||
(let [result (h/call wasm/internal-module "_set_children")]
|
(let [result (h/call wasm/internal-module "_set_children")]
|
||||||
(perf/end-measure "set-shape-children")
|
(perf/end-measure "set-shape-children")
|
||||||
result)))))
|
result)))
|
||||||
|
|
||||||
(defn- get-string-length [string] (+ (count string) 1))
|
(defn- get-string-length [string] (+ (count string) 1))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user