Removed the unregistration and new registration while merging undoManagers

This commit is contained in:
Oliver Sartun 2013-10-24 15:22:31 +02:00
parent db4982299b
commit e629e5cb56

View File

@ -703,13 +703,8 @@
while (manager = args.pop()) { while (manager = args.pop()) {
if (manager instanceof UndoManager && if (manager instanceof UndoManager &&
manager.stack instanceof UndoStack) { manager.stack instanceof UndoStack) {
// unregister already registered objects
var registeredObjects = this.objectRegistry.get();
this.unregisterAll();
// set the stack reference to our stack // set the stack reference to our stack
manager.stack = this.stack; manager.stack = this.stack;
// register the just unregistered objects, now on the new stack
apply(this.register, this, registeredObjects);
} }
} }
}, },