Skip to content

Commit

Permalink
Fixes: #659
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Dec 8, 2024
1 parent 05377da commit facf918
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/project-editor/core/objectAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions packages/project-editor/store/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit facf918

Please sign in to comment.