aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-18 15:36:59 -0700
committerValerio Virgillito2012-07-18 15:36:59 -0700
commitea0380210f0d33b49967e8d44eea623db3c02002 (patch)
treefd0e6604417a0cf454bce4755c4fb07e7db0001b /js/controllers
parentbc338d0ea9b5b711d36ca748c74e9c9ad59d0f99 (diff)
parent1cbb921537cce5d54885293e8c64833a42370154 (diff)
downloadninja-ea0380210f0d33b49967e8d44eea623db3c02002.tar.gz
Merge branch 'copy-paste-bugfix' of https://github.com/ananyasen/ninja
Diffstat (limited to 'js/controllers')
-rw-r--r--js/controllers/clipboard-controller.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/controllers/clipboard-controller.js b/js/controllers/clipboard-controller.js
index d2173e31..50538477 100644
--- a/js/controllers/clipboard-controller.js
+++ b/js/controllers/clipboard-controller.js
@@ -85,6 +85,11 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
85 return; 85 return;
86 } 86 }
87 87
88 //perform clipboard operations only if selection tool is selected
89 if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){
90 return;
91 }
92
88 if(this.clipboardContext === "stage"){ 93 if(this.clipboardContext === "stage"){
89 ElementsClipboardAgent.copy(clipboardEvent); 94 ElementsClipboardAgent.copy(clipboardEvent);
90 } 95 }
@@ -102,6 +107,11 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
102 return; 107 return;
103 } 108 }
104 109
110 //perform clipboard operations only if selection tool is selected
111 if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){
112 return;
113 }
114
105 if(this.clipboardContext === "stage"){ 115 if(this.clipboardContext === "stage"){
106 ElementsClipboardAgent.cut(clipboardEvent); 116 ElementsClipboardAgent.cut(clipboardEvent);
107 } 117 }
@@ -126,6 +136,11 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
126 return; 136 return;
127 } 137 }
128 138
139 //perform clipboard operations only if selection tool is selected
140 if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){
141 return;
142 }
143
129 //TODO: return if stage is not focussed 144 //TODO: return if stage is not focussed
130 145
131 if(this.clipboardContext === "stage"){ 146 if(this.clipboardContext === "stage"){