From 2815adfd7c19b3dff89dc3e1bda9af8d30dca8d6 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 6 Mar 2012 11:31:26 -0800 Subject: Timeline Fix for layer/element selection Signed-off-by: Jonathan Duran --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 6 +++--- js/panels/Timeline/Tween.reel/Tween.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'js/panels/Timeline') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 93fd170e..91277a63 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -494,7 +494,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { var ptrParent = nj.queryParentSelector(event.target, ".container-layer"); if (ptrParent !== false) { var myIndex = this.getActiveLayerIndex(); - this.selectLayer(myIndex); + this.selectLayer(myIndex, true); } } }, @@ -978,7 +978,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, selectLayer:{ - value:function (layerIndex) { + value:function (layerIndex, userSelection) { var i = 0; var arrLayersLength = this.arrLayers.length; @@ -996,7 +996,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this.layerRepetition.selectedIndexes = [layerIndex]; this.trackRepetition.selectedIndexes = [layerIndex]; this.currentLayerSelected = this.arrLayers[layerIndex]; - if(!this._openDoc){ + if(userSelection){ if(this._captureSelection){ if(this.currentLayerSelected.elementsList.length >= 1){ this.application.ninja.selectionController.selectElements(this.currentLayerSelected.elementsList); diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 3a195f47..6ff38bef 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -175,7 +175,7 @@ var Tween = exports.Tween = Montage.create(Component, { // select the containing layer var selectIndex = this.application.ninja.timeline.getLayerIndexByID(this.parentComponent.parentComponent.trackID); - this.application.ninja.timeline.selectLayer(selectIndex); + this.application.ninja.timeline.selectLayer(selectIndex, true); // tell timeline to deselect all other tweens and push this one as the currentSelectedTweens in timeline this.application.ninja.timeline.deselectTweens(); -- cgit v1.2.3