mirror of
https://github.com/penpot/penpot.git
synced 2025-05-31 19:46:11 +02:00
Merge pull request #2247 from penpot/palba-select-children-on-ungrouping
🐛 Fix when ungrouping, the items previously grouped should ALWAYS…
This commit is contained in:
commit
f98512242a
2 changed files with 13 additions and 6 deletions
|
@ -154,18 +154,24 @@
|
|||
is-group? #(or (= :bool (:type %)) (= :group (:type %)))
|
||||
lookup #(get objects %)
|
||||
prepare #(prepare-remove-group it page-id % objects)
|
||||
selected (wsh/lookup-selected state)
|
||||
children (into (d/ordered-set)
|
||||
(mapcat #(->> %
|
||||
lookup
|
||||
:shapes) selected))
|
||||
|
||||
changes-list (sequence
|
||||
(comp (map lookup)
|
||||
(filter is-group?)
|
||||
(map prepare))
|
||||
(wsh/lookup-selected state))
|
||||
(comp (map lookup)
|
||||
(filter is-group?)
|
||||
(map prepare))
|
||||
selected)
|
||||
|
||||
changes {:redo-changes (vec (mapcat :redo-changes changes-list))
|
||||
:undo-changes (vec (mapcat :undo-changes changes-list))
|
||||
:origin it}]
|
||||
|
||||
(rx/of (dch/commit-changes changes))))))
|
||||
(rx/of (dch/commit-changes changes)
|
||||
(dws/select-shapes children))))))
|
||||
|
||||
(def mask-group
|
||||
(ptk/reify ::mask-group
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue