mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Fix access to the prefab editor by hiding the drop-down menu item (#6850)
This commit is contained in:
@@ -16,6 +16,9 @@ import {
|
||||
extensionObjectsRootFolderId,
|
||||
} from '.';
|
||||
import Add from '../UI/CustomSvgIcons/Add';
|
||||
import Window from '../Utils/Window';
|
||||
|
||||
const isDev = Window.isDev();
|
||||
|
||||
const EVENTS_BASED_OBJECT_CLIPBOARD_KIND = 'Events Based Object';
|
||||
|
||||
@@ -143,11 +146,13 @@ export class EventsBasedObjectTreeViewItemContent
|
||||
|
||||
buildMenuTemplate(i18n: I18nType, index: number) {
|
||||
return [
|
||||
{
|
||||
label: i18n._(t`Open visual editor`),
|
||||
click: () =>
|
||||
this.props.onOpenCustomObjectEditor(this.eventsBasedObject),
|
||||
},
|
||||
isDev
|
||||
? {
|
||||
label: i18n._(t`Open visual editor`),
|
||||
click: () =>
|
||||
this.props.onOpenCustomObjectEditor(this.eventsBasedObject),
|
||||
}
|
||||
: null,
|
||||
{
|
||||
label: i18n._(t`Add a function`),
|
||||
click: () => this.addFunctionAtSelection(),
|
||||
@@ -184,7 +189,7 @@ export class EventsBasedObjectTreeViewItemContent
|
||||
click: () => this.paste(),
|
||||
accelerator: 'CmdOrCtrl+V',
|
||||
},
|
||||
];
|
||||
].filter(Boolean);
|
||||
}
|
||||
|
||||
renderRightComponent(i18n: I18nType): ?React.Node {
|
||||
|
Reference in New Issue
Block a user