From d582eb28c04eb8e1f1fa7a729ee20f2e7a0fb935 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Thu, 3 May 2012 16:47:18 -0700 Subject: Timeline: Bug fix: Master Duration not updating when all documents are closed. --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 80baffc8..cbd89b47 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -177,7 +177,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { }, set:function (val) { this._masterDuration = val; - this.timebar.style.width = (this._masterDuration / 12) + "px"; + var intDur = Math.round(val/12), + strWidth = intDur + "px"; + this.timebar.style.width = strWidth; } }, @@ -515,8 +517,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { "deleteLayer", "elementAdded", "elementsRemoved", - "elementReplaced", - "selectionChange"], + "elementReplaced"], + //"selectionChange"], i, arrEventsLength = arrEvents.length; @@ -690,12 +692,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { this._openDoc = false; this.end_hottext.value = 25; this.updateTrackContainerWidth(); - this.masterDuration = 0; // Clear the repetitions if (this.arrLayers.length > 0) { this.arrLayers = []; this.arrLayers.length = 0; } + this.resetMasterDuration(); } }, -- cgit v1.2.3