From fc22cd3b5c65dc6f137fbb59443e2061cbbcac26 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 19 Apr 2012 14:26:57 -0700 Subject: Timeline: Bug fix: Maintain selection between document switching. --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'js/panels/Timeline/TimelinePanel.reel') diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 33b99760..eeb74625 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -112,7 +112,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { var selectIndex = this.getLayerIndexByID(newVal); this._selectedLayerID = newVal; this._captureSelection = true; - this.selectLayer(selectIndex); + //console.log(selectIndex); + //debugger; + this.selectLayer(selectIndex, true); } } }, @@ -410,6 +412,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { returnObj.layerData.isTrackAnimated = false; returnObj.parentElementUUID = null; returnObj.parentElement = null; + returnObj.docUUID = this.application.ninja.currentDocument._uuid; return returnObj; } @@ -536,14 +539,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Initialize BreadCrumb this.application.ninja.breadCrumbClick = false; this.enablePanel(false); - - /* - Object.defineBinding(this, "breadCrumbContainer", { - boundObject:this.application.ninja, - boundObjectPropertyPath:"currentSelectedContainer", - oneway:true - }); - */ + } }, @@ -684,6 +680,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { // Clear the timeline but not the cache //console.log('TimelinePanel.handleDocumentChange'); if ((event.type === "closeDocument") && (this.application.ninja.documentController._documents.length > 0)) { + // Ignore extra closeDocument event that fires while there are still documents open. return; } this._boolCacheArrays = false; -- cgit v1.2.3