aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/clipboard-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/clipboard-controller.js')
-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"){