Skip to content

Commit 2ba0393

Browse files
committed
Fix variable group refactoring in variants.
1 parent b729022 commit 2ba0393

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

newIDE/app/src/ObjectGroupEditor/EditedObjectGroupEditorDialog.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,16 @@ const EditedObjectGroupEditorDialog = ({
104104
changeset,
105105
originalSerializedVariables
106106
);
107-
// TODO Apply the changes on variants when it's done on an events-based object.
107+
const { eventsBasedObject } = projectScopedContainersAccessor._scope;
108+
if (eventsBasedObject) {
109+
for (const objectName of group.getAllObjectsNames().toJSArray()) {
110+
gd.ObjectVariableHelper.applyChangesToVariants(
111+
eventsBasedObject,
112+
objectName,
113+
changeset
114+
);
115+
}
116+
}
108117
groupVariablesContainer.clearPersistentUuid();
109118
};
110119

newIDE/app/src/VariablesList/ObjectGroupVariablesDialog.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,16 @@ const ObjectGroupVariablesDialog = ({
102102
changeset,
103103
originalSerializedVariables
104104
);
105-
// TODO Apply the changes on variants when it's done on an events-based object.
105+
const { eventsBasedObject } = projectScopedContainersAccessor._scope;
106+
if (eventsBasedObject) {
107+
for (const objectName of objectGroup.getAllObjectsNames().toJSArray()) {
108+
gd.ObjectVariableHelper.applyChangesToVariants(
109+
eventsBasedObject,
110+
objectName,
111+
changeset
112+
);
113+
}
114+
}
106115
groupVariablesContainer.clearPersistentUuid();
107116
};
108117

0 commit comments

Comments
 (0)