mirror of
https://github.com/penpot/penpot.git
synced 2025-07-27 22:07:19 +02:00
Merge pull request #6312 from penpot/elenatorro-fix-children-removal-regression
🐛 Fix last shape removal
This commit is contained in:
commit
25950bb5a5
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)]
|
||||||
(when (> num-shapes 0)
|
|
||||||
(perf/begin-measure "set-shape-children")
|
(perf/begin-measure "set-shape-children")
|
||||||
|
(when (> num-shapes 0)
|
||||||
(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