aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Duran2012-03-16 16:38:42 -0700
committerJonathan Duran2012-03-16 16:38:42 -0700
commit595a569cf459e7e7cbe19e546c23322b56e44341 (patch)
tree28f7e2dbd937a2796011a47ea03f92c70ed75248
parentf23bc5d195cfbe47cafe7e01f961e8f1631cff7c (diff)
downloadninja-595a569cf459e7e7cbe19e546c23322b56e44341.tar.gz
Fix layer order and selection on reopen
Layer order should be in the same order as created. Nothing should be selected with opening a doc. Signed-off-by: Jonathan Duran <jduran@motorola.com>
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 21ecdc39..fd297fd3 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -381,9 +381,6 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
381 this._openDoc = true; 381 this._openDoc = true;
382 this.restoreLayer(this.application.ninja.currentDocument.documentRoot.children[myIndex]); 382 this.restoreLayer(this.application.ninja.currentDocument.documentRoot.children[myIndex]);
383 } 383 }
384 // select the first layer
385 this.temparrLayers[0].layerData.isSelected = true;
386 this.temparrLayers[0].layerData._isFirstDraw = true;
387 } 384 }
388 // Feed the new array of objects into the repetitions. 385 // Feed the new array of objects into the repetitions.
389 this.arrLayers = this.temparrLayers; 386 this.arrLayers = this.temparrLayers;
@@ -666,7 +663,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
666 if (this._hashFind) { 663 if (this._hashFind) {
667 for (layerResult = this.returnedObject[hashIndex]; layerResult; hashIndex++) { 664 for (layerResult = this.returnedObject[hashIndex]; layerResult; hashIndex++) {
668 if (layerResult.layerData.deleted !== true) { 665 if (layerResult.layerData.deleted !== true) {
669 this.arrLayers.push(layerResult); 666 this.arrLayers.splice(0, 0, layerResult);
670 667
671 } 668 }
672 } 669 }
@@ -686,7 +683,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
686 thingToPush.layerData.elementsList.push(ele); 683 thingToPush.layerData.elementsList.push(ele);
687 } 684 }
688 685
689 this.temparrLayers.push(thingToPush); 686 this.temparrLayers.splice(0, 0, thingToPush);
690 thingToPush.layerData.trackPosition = this.temparrLayers.length - 1; 687 thingToPush.layerData.trackPosition = this.temparrLayers.length - 1;
691 thingToPush.layerData.layerPosition = this.temparrLayers.length - 1; 688 thingToPush.layerData.layerPosition = this.temparrLayers.length - 1;
692 689