From facf91888a8d52f4faa3d5235c940db2fd50050d Mon Sep 17 00:00:00 2001 From: Martin Vladic Date: Sun, 8 Dec 2024 15:46:33 +0100 Subject: [PATCH] Fixes: #659 --- packages/project-editor/core/objectAdapter.ts | 7 ++++--- packages/project-editor/store/helper.ts | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/project-editor/core/objectAdapter.ts b/packages/project-editor/core/objectAdapter.ts index 23969098..80487759 100644 --- a/packages/project-editor/core/objectAdapter.ts +++ b/packages/project-editor/core/objectAdapter.ts @@ -762,15 +762,16 @@ export class TreeObjectAdapter { menuItems = menuItems.concat(additionalMenuItems); } - console.log("selectedObject", selectedObject); - console.log("parentObject", parentObject); if ( editable && getAncestorOfType( selectedObject || parentObject, ProjectEditor.FlowClass.classInfo ) && - getKey(parentObject) != "localVariables" + getKey(parentObject) != "localVariables" && + getKey(parentObject) != "actions" && + getKey(parentObject) != "userPages" && + getKey(parentObject) != "userWidgets" ) { ProjectEditor.newComponentMenuItem( selectedObject || parentObject, diff --git a/packages/project-editor/store/helper.ts b/packages/project-editor/store/helper.ts index a8659b0e..ffd7ae89 100644 --- a/packages/project-editor/store/helper.ts +++ b/packages/project-editor/store/helper.ts @@ -742,6 +742,9 @@ export function getAddItemName(object: IEezObject) { if (parent == project.userWidgets) { return "User Widget"; } + if (parent == project.actions) { + return "User Action"; + } if (getParent(parent) == project.lvglStyles) { return "Style"; }