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.js27
1 files changed, 24 insertions, 3 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 9f9a747a..bb5ca036 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -919,7 +919,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
919 for (i = 0; i < arrLayersLength; i++) { 919 for (i = 0; i < arrLayersLength; i++) {
920 if (this.arrLayers[i].layerData.isSelected === true) { 920 if (this.arrLayers[i].layerData.isSelected === true) {
921 if (arrSelectedIndexes.indexOf(i) < 0) { 921 if (arrSelectedIndexes.indexOf(i) < 0) {
922 console.log("TimelinePanel.selectLayers, deselecting ", i); 922
923 this.arrLayers[i].layerData.isSelected = false; 923 this.arrLayers[i].layerData.isSelected = false;
924 this.triggerLayerBinding(i); 924 this.triggerLayerBinding(i);
925 } 925 }
@@ -992,7 +992,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
992 value: function() { 992 value: function() {
993 var arrSelectedElements = [], 993 var arrSelectedElements = [],
994 i = 0, 994 i = 0,
995 arrLayersLength = this.arrLayers.length; 995 j = 0,
996 arrLayersLength = this.arrLayers.length,
997 boolDoIt = false,
998 arrSelectedElementsLength = 0,
999 arrStageIndexes = this.getSelectedLayerIndexesFromStage(),
1000 arrStageIndexesLength = arrStageIndexes.length;
996 1001
997 // Get the selected layers 1002 // Get the selected layers
998 for (i = 0; i < arrLayersLength; i++) { 1003 for (i = 0; i < arrLayersLength; i++) {
@@ -1000,9 +1005,25 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1000 arrSelectedElements.push(this.arrLayers[i].layerData.stageElement); 1005 arrSelectedElements.push(this.arrLayers[i].layerData.stageElement);
1001 } 1006 }
1002 } 1007 }
1008 arrSelectedElementsLength = arrSelectedElements.length;
1009
1010 // check to see if we even need to continue...
1011 if (arrSelectedElementsLength !== arrStageIndexesLength) {
1012 boolDoIt = true;
1013 } else {
1014 for (i = 0; i < arrStageIndexesLength; i++) {
1015 if (this.currentLayersSelected.indexOf(arrStageIndexes[i]) < 0) {
1016 boolDoIt = true;
1017 }
1018 }
1019 }
1020
1021 if (boolDoIt === false) {
1022 return;
1023 }
1003 1024
1004 // Select the layers, or clear the selection if none were found 1025 // Select the layers, or clear the selection if none were found
1005 if (arrSelectedElements.length > 0) { 1026 if (arrSelectedElementsLength > 0) {
1006 this.application.ninja.selectionController.selectElements(arrSelectedElements); 1027 this.application.ninja.selectionController.selectElements(arrSelectedElements);
1007 } else { 1028 } else {
1008 this.application.ninja.selectionController.executeSelectElement(); 1029 this.application.ninja.selectionController.executeSelectElement();