The merge method now makes use of the unregisterAll method
This commit is contained in:
parent
8938a0dc84
commit
3ef848ac25
@ -706,13 +706,12 @@
|
||||
if (undoManager instanceof UndoManager &&
|
||||
undoManager.stack instanceof UndoStack) {
|
||||
// unregister already registered objects
|
||||
var registeredObjects = this.objectRegistry.get(),
|
||||
hasObjects = !!registeredObjects.length;
|
||||
if (hasObjects) apply(this.unregister, this, registeredObjects);
|
||||
var registeredObjects = this.objectRegistry.get();
|
||||
this.unregisterAll();
|
||||
// replace the stack reference
|
||||
this.stack = undoManager.stack;
|
||||
// register the just unregistered objects, now on the new stack
|
||||
if (hasObjects) apply(this.register, this, registeredObjects);
|
||||
apply(this.register, this, registeredObjects);
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user