utils: use getPasteIndex

This commit is contained in:
rolux 2014-02-12 14:55:15 +00:00
parent c41fbbc208
commit 9595b2555d

View file

@ -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)));