diff options
author | Jonathan Duran | 2012-07-23 08:25:56 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-07-23 08:25:56 -0700 |
commit | e7268388a99722dd7bb64506893538fd0ee96a71 (patch) | |
tree | 9e0f960030f1625f730bbd60ca79ce449a788df0 /js/mediators | |
parent | 3487c690d526534f27578acdffe1a45f2526cbf6 (diff) | |
parent | 2b05717e49bafc4b401441d9a55153b9e4ae7e43 (diff) | |
download | ninja-e7268388a99722dd7bb64506893538fd0ee96a71.tar.gz |
Merge branch 'refs/heads/NINJA-master' into TimelineUber
Diffstat (limited to 'js/mediators')
-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 | ||