aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js26
1 files changed, 24 insertions, 2 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index f35ce2d3..871a723b 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -947,6 +947,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
947 for (i = 0; i < arrLayersLength; i++) { 947 for (i = 0; i < arrLayersLength; i++) {
948 if (this.arrLayers[i].layerData.isSelected === true) { 948 if (this.arrLayers[i].layerData.isSelected === true) {
949 if (arrSelectedIndexes.indexOf(i) < 0) { 949 if (arrSelectedIndexes.indexOf(i) < 0) {
950
950 this.arrLayers[i].layerData.isSelected = false; 951 this.arrLayers[i].layerData.isSelected = false;
951 this.triggerLayerBinding(i); 952 this.triggerLayerBinding(i);
952 } 953 }
@@ -1019,7 +1020,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1019 value: function() { 1020 value: function() {
1020 var arrSelectedElements = [], 1021 var arrSelectedElements = [],
1021 i = 0, 1022 i = 0,
1022 arrLayersLength = this.arrLayers.length; 1023 j = 0,
1024 arrLayersLength = this.arrLayers.length,
1025 boolDoIt = false,
1026 arrSelectedElementsLength = 0,
1027 arrStageIndexes = this.getSelectedLayerIndexesFromStage(),
1028 arrStageIndexesLength = arrStageIndexes.length;
1023 1029
1024 // Get the selected layers 1030 // Get the selected layers
1025 for (i = 0; i < arrLayersLength; i++) { 1031 for (i = 0; i < arrLayersLength; i++) {
@@ -1027,9 +1033,25 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1027 arrSelectedElements.push(this.arrLayers[i].layerData.stageElement); 1033 arrSelectedElements.push(this.arrLayers[i].layerData.stageElement);
1028 } 1034 }
1029 } 1035 }
1036 arrSelectedElementsLength = arrSelectedElements.length;
1037
1038 // check to see if we even need to continue...
1039 if (arrSelectedElementsLength !== arrStageIndexesLength) {
1040 boolDoIt = true;
1041 } else {
1042 for (i = 0; i < arrStageIndexesLength; i++) {
1043 if (this.currentLayersSelected.indexOf(arrStageIndexes[i]) < 0) {
1044 boolDoIt = true;
1045 }
1046 }
1047 }
1048
1049 if (boolDoIt === false) {
1050 return;
1051 }
1030 1052
1031 // Select the layers, or clear the selection if none were found 1053 // Select the layers, or clear the selection if none were found
1032 if (arrSelectedElements.length > 0) { 1054 if (arrSelectedElementsLength > 0) {
1033 this.application.ninja.selectionController.selectElements(arrSelectedElements); 1055 this.application.ninja.selectionController.selectElements(arrSelectedElements);
1034 } else { 1056 } else {
1035 this.application.ninja.selectionController.executeSelectElement(); 1057 this.application.ninja.selectionController.executeSelectElement();