diff options
author | Valerio Virgillito | 2012-07-18 15:36:49 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-18 15:36:49 -0700 |
commit | 2182ee66b4220445d04be91cbec960c39a8905ad (patch) | |
tree | 1140a728ab49ac9160c5bc8e6bfdab20d0e67efb /js/controllers | |
parent | ecc2f1c6296ac5e706b1d6388254c8df24a01066 (diff) | |
parent | 1cbb921537cce5d54885293e8c64833a42370154 (diff) | |
download | ninja-2182ee66b4220445d04be91cbec960c39a8905ad.tar.gz |
Merge branch 'copy-paste-bugfix' of https://github.com/ananyasen/ninja into v0.7.1
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 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"){ |