0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-09 16:48:16 -05: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:
Alejandro 2022-09-12 08:27:14 +02:00 committed by GitHub
commit f98512242a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 6 deletions

View file

@ -10,7 +10,8 @@
- Fix problem editing rotated texts [Taiga #4026](https://tree.taiga.io/project/penpot/issue/4026)
- Fix problem with texts for non existing fonts [Taiga #4087](https://tree.taiga.io/project/penpot/issue/4087)
- Fix undo after moving layers will wrongly order the layers [Taiga #3344](https://tree.taiga.io/project/penpot/issue/3344)
- Fix Grouping typographies by drag & drop does not work (again) [#2203](https://github.com/penpot/penpot/issues/2203)
- Fix grouping typographies by drag & drop does not work (again) [#2203](https://github.com/penpot/penpot/issues/2203)
- Fix when ungrouping, the items previously grouped should ALWAYS remain selected [Taiga #4064](https://tree.taiga.io/project/penpot/issue/4064)
## 1.15.2-beta

View file

@ -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