🐛 Fix menu context for single element nested in components

This commit is contained in:
alonso.torres 2021-10-04 17:05:37 +02:00
parent 1a61c855ca
commit 4b1fa2589e
2 changed files with 2 additions and 3 deletions

View file

@ -11,6 +11,7 @@
### :bug: Bugs fixed ### :bug: Bugs fixed
- Fix problem with overflow dropdown on stroke-cap [#1216](https://github.com/penpot/penpot/issues/1216) - Fix problem with overflow dropdown on stroke-cap [#1216](https://github.com/penpot/penpot/issues/1216)
- Fix menu context for single element nested in components [#1186](https://github.com/penpot/penpot/issues/1186)
### :arrow_up: Deps updates ### :arrow_up: Deps updates
### :boom: Breaking changes ### :boom: Breaking changes

View file

@ -279,9 +279,7 @@
[:& menu-entry {:title (tr "workspace.shape.menu.delete-flow-start") [:& menu-entry {:title (tr "workspace.shape.menu.delete-flow-start")
:on-click (do-remove-flow flow)}]))) :on-click (do-remove-flow flow)}])))
(when (and (or (nil? (:shape-ref shape)) (when (not= (:type shape) :frame)
(> (count selected) 1))
(not= (:type shape) :frame))
[:* [:*
[:& menu-separator] [:& menu-separator]
[:& menu-entry {:title (tr "workspace.shape.menu.create-component") [:& menu-entry {:title (tr "workspace.shape.menu.create-component")