From 9595b2555d000239e97a0bbeda3ff6d13a60ec4a Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 12 Feb 2014 14:55:15 +0000 Subject: [PATCH] utils: use getPasteIndex --- static/js/utils.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/static/js/utils.js b/static/js/utils.js index 40a90a36e..b4b82ce97 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -439,12 +439,7 @@ pandora.createLinks = function($element) { pandora.api.addClips({ clips: pandora.getClipData(items), edit: target, - index: pandora.user.ui.edits[pandora.user.ui.edit].selection.length - ? Ox.getObjectById( - pandora.$ui.editPanel.options('clips'), - pandora.user.ui.edits[pandora.user.ui.edit].selection[0] - ).index - : void 0 + index: pandora.$ui.editPanel.getPasteIndex() }, function(result) { // adding clips creates new ids, so mutate items in history items.splice.apply(items, [0, items.length].concat(pandora.getClipItems(result.data.clips)));