From e600253fa8e6027c4bac7ebb69e0d4ce12a76ff8 Mon Sep 17 00:00:00 2001 From: Jon Reid Date: Mon, 18 Jun 2012 16:46:00 -0700 Subject: Timeline: Enable splitting of keyframes with F6 interaction. Bug fix: Error on console if you press F6 with no layer selected. --- js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (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 27b3537c..339ca5a4 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js @@ -1016,7 +1016,12 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { //console.log(this.trackRepetition); var tempEv = {}; tempEv.offsetX = this.playheadmarker.offsetLeft; - this.trackRepetition.childComponents[this.currentLayersSelected[0]].handleKeyboardShortcut(tempEv); + if (typeof(this.trackRepetition.childComponents[this.currentLayersSelected[0]]) !== "undefined") { + this.trackRepetition.childComponents[this.currentLayersSelected[0]].handleKeyboardShortcut(tempEv); + } else { + // oops, we do not have a layer selected. We should growl at the user. For now, this will fail silently. + } + } }, -- cgit v1.2.3