mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-14 14:22:45 +00:00
#1369: Go to main component replaces Create component only when every selected layer is an instance
This commit is contained in:
1 parent
35108cf8dc
commit
8186c4da3f
1 file changed
+1
-1
@@ -1025,7 +1025,7 @@ pub fn popups(app: &mut FigApp, ctx: &egui::Context) {
|
||||
.session
|
||||
.doc()
|
||||
.ok()
|
||||
.is_some_and(|doc| ids.iter().any(|i| doc.node(*i).is_some_and(|n| matches!(n.kind, figcraft_doc::NodeKind::Instance { .. }))))
|
||||
.is_some_and(|doc| ids.iter().all(|i| doc.node(*i).is_some_and(|n| matches!(n.kind, figcraft_doc::NodeKind::Instance { .. }))))
|
||||
&& let Some(at) = entries.iter().position(|e| e.1 == "component.create")
|
||||
{
|
||||
entries[at] = (tr("Go to main component"), "component.goToMain");
|
||||
|
||||
Reference in new issue
Block a user