diff options
-rwxr-xr-x | js/mediators/element-mediator.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/js/mediators/element-mediator.js b/js/mediators/element-mediator.js index 4a4c9f88..f5b574fc 100755 --- a/js/mediators/element-mediator.js +++ b/js/mediators/element-mediator.js | |||
@@ -69,7 +69,7 @@ exports.ElementMediator = Montage.create(Component, { | |||
69 | 69 | ||
70 | var undoLabel = "add element"; | 70 | var undoLabel = "add element"; |
71 | 71 | ||
72 | document.application.undoManager.add(undoLabel, this.removeElements, this, elements, notify); | 72 | document.application.undoManager.add(undoLabel, this.removeElements, this, elements, notify, false); |
73 | 73 | ||
74 | this.application.ninja.currentDocument.model.needsSave = true; | 74 | this.application.ninja.currentDocument.model.needsSave = true; |
75 | 75 | ||
@@ -80,9 +80,10 @@ exports.ElementMediator = Montage.create(Component, { | |||
80 | }, | 80 | }, |
81 | 81 | ||
82 | removeElements:{ | 82 | removeElements:{ |
83 | value:function (elements, notify /* Used for the add undo */) { | 83 | value:function (elements, notify, callDeleteDelegate) { |
84 | 84 | ||
85 | if (this.deleteDelegate && (typeof this.deleteDelegate.handleDelete === 'function')) { | 85 | if ((callDeleteDelegate || (typeof callDeleteDelegate === "undefined")) |
86 | && this.deleteDelegate && (typeof this.deleteDelegate.handleDelete === 'function')) { | ||
86 | return this.deleteDelegate.handleDelete(); | 87 | return this.deleteDelegate.handleDelete(); |
87 | // this.handleDelete.call(deleteDelegate); | 88 | // this.handleDelete.call(deleteDelegate); |
88 | } | 89 | } |
@@ -98,7 +99,7 @@ exports.ElementMediator = Montage.create(Component, { | |||
98 | 99 | ||
99 | var undoLabel = "add element"; | 100 | var undoLabel = "add element"; |
100 | 101 | ||
101 | document.application.undoManager.add(undoLabel, this.addElements, this, elements, null, notify); | 102 | document.application.undoManager.add(undoLabel, this.addElements, this, elements, null, notify, false); |
102 | 103 | ||
103 | this.application.ninja.currentDocument.model.needsSave = true; | 104 | this.application.ninja.currentDocument.model.needsSave = true; |
104 | 105 | ||