diff options
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js')
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index bb3ff170..27b3537c 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -933,12 +933,11 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
933 | 933 | ||
934 | // We're reading from the cache, not writing to it. | 934 | // We're reading from the cache, not writing to it. |
935 | this._boolCacheArrays = false; | 935 | this._boolCacheArrays = false; |
936 | |||
937 | // We are about to redraw the layers and tracks for the first time, so they need to go through their | ||
938 | // respective firstDraw routines. | ||
936 | for (i = 0; i < tlArrLayersLength; i++) { | 939 | for (i = 0; i < tlArrLayersLength; i++) { |
937 | if (this.application.ninja.currentDocument.tlArrLayers[i].layerData.isSelected === true) { | 940 | this.application.ninja.currentDocument.tlArrLayers[i].layerData._isFirstDraw = true; |
938 | this.application.ninja.currentDocument.tlArrLayers[i].layerData._isFirstDraw = true; | ||
939 | } else { | ||
940 | this.application.ninja.currentDocument.tlArrLayers[i].layerData._isFirstDraw = false; | ||
941 | } | ||
942 | } | 941 | } |
943 | this.arrLayers = this.application.ninja.currentDocument.tlArrLayers; | 942 | this.arrLayers = this.application.ninja.currentDocument.tlArrLayers; |
944 | this.currentLayerNumber = this.application.ninja.currentDocument.tllayerNumber; | 943 | this.currentLayerNumber = this.application.ninja.currentDocument.tllayerNumber; |
@@ -1935,6 +1934,20 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
1935 | return false; | 1934 | return false; |
1936 | } | 1935 | } |
1937 | }, | 1936 | }, |
1937 | |||
1938 | getActiveLayerIndex: { | ||
1939 | value: function() { | ||
1940 | var i = 0, | ||
1941 | returnVal = false, | ||
1942 | arrLayersLength = this.arrLayers.length; | ||
1943 | for (i = 0; i < arrLayersLength; i++) { | ||
1944 | if (this.arrLayers[i].isSelected === true) { | ||
1945 | returnVal = i; | ||
1946 | } | ||
1947 | } | ||
1948 | return returnVal; | ||
1949 | } | ||
1950 | }, | ||
1938 | /* === END: Controllers === */ | 1951 | /* === END: Controllers === */ |
1939 | 1952 | ||
1940 | /* === BEGIN: Logging routines === */ | 1953 | /* === BEGIN: Logging routines === */ |