diff options
Diffstat (limited to 'js/controllers')
-rw-r--r-- | js/controllers/clipboard-controller.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/controllers/clipboard-controller.js b/js/controllers/clipboard-controller.js index afc94c8c..c3543c95 100644 --- a/js/controllers/clipboard-controller.js +++ b/js/controllers/clipboard-controller.js | |||
@@ -87,6 +87,11 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component | |||
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | //perform clipboard operations only if selection tool is selected | ||
91 | if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){ | ||
92 | return; | ||
93 | } | ||
94 | |||
90 | if(this.clipboardContext === "stage"){ | 95 | if(this.clipboardContext === "stage"){ |
91 | ElementsClipboardAgent.copy(clipboardEvent); | 96 | ElementsClipboardAgent.copy(clipboardEvent); |
92 | } | 97 | } |
@@ -106,6 +111,11 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component | |||
106 | } | 111 | } |
107 | } | 112 | } |
108 | 113 | ||
114 | //perform clipboard operations only if selection tool is selected | ||
115 | if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){ | ||
116 | return; | ||
117 | } | ||
118 | |||
109 | if(this.clipboardContext === "stage"){ | 119 | if(this.clipboardContext === "stage"){ |
110 | ElementsClipboardAgent.cut(clipboardEvent); | 120 | ElementsClipboardAgent.cut(clipboardEvent); |
111 | } | 121 | } |
@@ -132,6 +142,11 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component | |||
132 | } | 142 | } |
133 | } | 143 | } |
134 | 144 | ||
145 | //perform clipboard operations only if selection tool is selected | ||
146 | if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){ | ||
147 | return; | ||
148 | } | ||
149 | |||
135 | //TODO: return if stage is not focussed | 150 | //TODO: return if stage is not focussed |
136 | 151 | ||
137 | if(this.clipboardContext === "stage"){ | 152 | if(this.clipboardContext === "stage"){ |