mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Simplify SceneEditor _onSelectInstances method
This commit is contained in:
@@ -43,7 +43,7 @@ export default class InstancesSelection {
|
||||
}
|
||||
|
||||
selectInstances(
|
||||
instances: [gdInitialInstance],
|
||||
instances: Array<gdInitialInstance>,
|
||||
multiselect: boolean,
|
||||
layersVisibility: ?{ [string]: boolean } = null
|
||||
) {
|
||||
|
@@ -532,10 +532,7 @@ export default class SceneEditor extends React.Component<Props, State> {
|
||||
instances: Array<gdInitialInstance>,
|
||||
centerView: boolean = true
|
||||
) => {
|
||||
this.instancesSelection.clearSelection();
|
||||
instances.forEach(instance =>
|
||||
this.instancesSelection.selectInstance(instance, true)
|
||||
);
|
||||
this.instancesSelection.selectInstances(instances, false);
|
||||
|
||||
if (centerView) {
|
||||
if (this.editor) this.editor.centerViewOn(instances);
|
||||
|
Reference in New Issue
Block a user