diff --git a/newIDE/app/src/AssetStore/NewObjectFromScratch.js b/newIDE/app/src/AssetStore/NewObjectFromScratch.js
index 6cd556c234ac..f61eb4c91e45 100644
--- a/newIDE/app/src/AssetStore/NewObjectFromScratch.js
+++ b/newIDE/app/src/AssetStore/NewObjectFromScratch.js
@@ -201,7 +201,6 @@ export default function NewObjectFromScratch({
eventsBasedObject
);
}
- // $FlowFixMe[incompatible-type]
return {
type: object.type,
fullName: object.fullName,
diff --git a/newIDE/app/src/AssetStore/ObjectListItem.js b/newIDE/app/src/AssetStore/ObjectListItem.js
index 416c6a18dba0..eaf8127d4fc3 100644
--- a/newIDE/app/src/AssetStore/ObjectListItem.js
+++ b/newIDE/app/src/AssetStore/ObjectListItem.js
@@ -79,7 +79,8 @@ export const ObjectListItem = ({
);
};
- const isEnabled = isEngineCompatible;
+ const isEnabled =
+ isEngineCompatible && !objectShortHeader.isDependentWithParent;
const chooseObject = React.useCallback(
() => {
@@ -165,6 +166,25 @@ export const ObjectListItem = ({
)}
+ {objectShortHeader.isDependentWithParent && (
+
+ This object can't be used here because it would create a
+ circular dependency with the object being edited.
+
+ }
+ >
+
+ No cycle}
+ variant="outlined"
+ onClick={() => {}}
+ />
+
+
+ )}