mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Fix behavior instructions not selecting the object when edited in NewInstructionEditorDialog
This commit is contained in:

committed by
Florian Rival

parent
eb3aa28078
commit
2b64b6e97c
@@ -235,7 +235,7 @@ export default class InstructionOrObjectSelector extends React.Component<
|
||||
{(isSearching || currentTab === 'objects') &&
|
||||
displayedObjectsList.map(objectWithContext => (
|
||||
<SelectorObjectListItem
|
||||
key={"object-" + objectWithContext.object.ptr}
|
||||
key={'object-' + objectWithContext.object.ptr}
|
||||
project={project}
|
||||
objectWithContext={objectWithContext}
|
||||
iconSize={iconSize}
|
||||
@@ -253,7 +253,7 @@ export default class InstructionOrObjectSelector extends React.Component<
|
||||
{(isSearching || currentTab === 'objects') &&
|
||||
displayedObjectGroupsList.map(groupWithContext => (
|
||||
<SelectorGroupObjectsListItem
|
||||
key={"group-" + groupWithContext.group.ptr}
|
||||
key={'group-' + groupWithContext.group.ptr}
|
||||
groupWithContext={groupWithContext}
|
||||
iconSize={iconSize}
|
||||
onClick={() =>
|
||||
@@ -273,7 +273,7 @@ export default class InstructionOrObjectSelector extends React.Component<
|
||||
{isSearching &&
|
||||
displayedInstructionsList.map(instructionMetadata => (
|
||||
<SelectorInstructionOrExpressionListItem
|
||||
key={"instruction-"+instructionMetadata.type}
|
||||
key={'instruction-' + instructionMetadata.type}
|
||||
instructionOrExpressionMetadata={
|
||||
instructionMetadata
|
||||
}
|
||||
|
@@ -85,7 +85,8 @@ export default class NewInstructionEditorDialog extends React.Component<
|
||||
);
|
||||
if (
|
||||
instructionMetadata &&
|
||||
instructionMetadata.scope.objectMetadata &&
|
||||
(instructionMetadata.scope.objectMetadata ||
|
||||
instructionMetadata.scope.behaviorMetadata) &&
|
||||
instruction.getParametersCount() > 0
|
||||
) {
|
||||
return this._chooseObject(instruction.getParameter(0));
|
||||
|
Reference in New Issue
Block a user