aboutsummaryrefslogtreecommitdiff
path: root/js/mediators/element-mediator.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-20 15:44:57 -0700
committerValerio Virgillito2012-07-20 15:44:57 -0700
commitd0526d124f2bbc1c28912d2d3de925d175f5e2d5 (patch)
tree9010ff97310f209fe35fef06899056cab8169282 /js/mediators/element-mediator.js
parentc6965b0329672daeffbb3f76746821ab72ad03c8 (diff)
parentd7f5d6ffb39d55f2d4f4f366421571826df1e8bb (diff)
downloadninja-d0526d124f2bbc1c28912d2d3de925d175f5e2d5.tar.gz
Merge branch 'Fixes_071' of https://github.com/mqg734/ninja into v0.7.1
Diffstat (limited to 'js/mediators/element-mediator.js')
-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