inline functoin only gets called once. fixes #2841

This commit is contained in:
j 2015-10-05 12:53:11 +02:00
parent 2e3b61d163
commit 7c630ca0b1

View file

@ -414,11 +414,9 @@ pandora.ui.mainMenu = function() {
var action = data.id == 'copy' ? 'copy' : 'add',
type = 'clip', clips;
fromMenu = true;
function formatClip(clip) {
return clip.annotation || (clip.item||ui.item) + '/' + clip['in'] + '-' + clip.out;
}
if (pandora.isVideoView() && !pandora.$ui.browser.hasFocus()) {
clips = [formatClip(ui.videoPoints[ui.item])];
var clip = ui.videoPoints[ui.item];
clips = [clip.annotation || ui.item + '/' + clip['in'] + '-' + clip.out];
} else if (pandora.isClipView() && !pandora.$ui.browser.hasFocus()) {
clips = pandora.$ui.clipList.options('selected');
} else if (ui.section == 'edits') {