aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-20 15:45:23 -0700
committerValerio Virgillito2012-07-20 15:45:23 -0700
commita9b17cef34d3c4f222b6f4d0949fa3c2bbfe867b (patch)
tree5adb6c7c4bf4e13c70379050627ad6d42a7a86e6 /js/mediators
parent288b81e06db68b785524db5c7f7ae1ecbc3d83b1 (diff)
parentd7f5d6ffb39d55f2d4f4f366421571826df1e8bb (diff)
downloadninja-a9b17cef34d3c4f222b6f4d0949fa3c2bbfe867b.tar.gz
Merge branch 'Fixes_071' of https://github.com/mqg734/ninja
Diffstat (limited to 'js/mediators')
-rwxr-xr-xjs/mediators/element-mediator.js9
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