Skip to content

Commit 4a807b6

Browse files
authored
Fix editor that was setting the z order of a new instance a bit randomly
1 parent dbfef27 commit 4a807b6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

newIDE/app/src/InstancesEditor/InstancesAdder.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export default class InstancesAdder {
5959
pos: [number, number],
6060
objectNames: Array<string>
6161
): Array<gdInitialInstance> => {
62+
this._zOrderFinder.reset();
6263
this._instances.iterateOverInstances(this._zOrderFinder);
6364
const zOrder = this._zOrderFinder.getHighestZOrder() + 1;
6465

@@ -99,6 +100,7 @@ export default class InstancesAdder {
99100
) => {
100101
this.deleteTemporaryInstances();
101102

103+
this._zOrderFinder.reset();
102104
this._instances.iterateOverInstances(this._zOrderFinder);
103105
const zOrder = this._zOrderFinder.getHighestZOrder() + 1;
104106

0 commit comments

Comments
 (0)