mirror of
https://github.com/penpot/penpot.git
synced 2025-07-08 00:17:16 +02:00
🐛 Fix last shape removal
This commit is contained in:
parent
25a44e1387
commit
1ab5d5027f
1 changed files with 5 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue