From f1e01ab5c62bad8bcaf6c033cb251b889362f01d Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Mon, 23 Apr 2012 09:00:57 -0700 Subject: Fix Select All bug and remove debuggers Signed-off-by: Jonathan Duran --- .../Timeline/TimelinePanel.reel/TimelinePanel.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 4eed6af8..8c3b64eb 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -543,7 +543,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.drawTimeMarkers(); // Document switching // Check to see if we have saved timeline information in the currentDocument. - debugger; + //debugger; if ((typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined")) { //console.log('TimelinePanel.initTimelineForDocument: new Document'); // No, we have no information stored. @@ -611,7 +611,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.currentLayerSelected = this.application.ninja.currentDocument.tlCurrentLayerSelected; - debugger; + //debugger; if (typeof(this.application.ninja.currentDocument.tlCurrentSelectedContainer) !== "undefined") { this.application.ninja.currentSelectedContainer=this.application.ninja.currentDocument.tlCurrentSelectedContainer; } @@ -774,13 +774,15 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { value:function () { var layerIndex, i = 0, arrLayersLength = this.arrLayers.length; this.deselectTweens(); - if (this.application.ninja.selectedElements[0]) { - for (i = 0; i < arrLayersLength; i++) { - if (this.application.ninja.selectedElements[0].uuid === this.arrLayers[i].layerData.elementsList[0].uuid) { - layerIndex = this.getLayerIndexByID(this.arrLayers[i].layerData.layerID); - this._captureSelection = false; - this.selectLayer(layerIndex); - this._captureSelection = true; + if (this.application.ninja.selectedElements.length === 1) { + if (this.application.ninja.selectedElements[0]) { + for (i = 0; i < arrLayersLength; i++) { + if (this.application.ninja.selectedElements[0].uuid === this.arrLayers[i].layerData.elementsList[0].uuid) { + layerIndex = this.getLayerIndexByID(this.arrLayers[i].layerData.layerID); + this._captureSelection = false; + this.selectLayer(layerIndex); + this._captureSelection = true; + } } } } -- cgit v1.2.3