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({ pandora.api.addClips({
clips: pandora.getClipData(items), clips: pandora.getClipData(items),
edit: target, edit: target,
index: pandora.user.ui.edits[pandora.user.ui.edit].selection.length index: pandora.$ui.editPanel.getPasteIndex()
? Ox.getObjectById(
pandora.$ui.editPanel.options('clips'),
pandora.user.ui.edits[pandora.user.ui.edit].selection[0]
).index
: void 0
}, function(result) { }, function(result) {
// adding clips creates new ids, so mutate items in history // adding clips creates new ids, so mutate items in history
items.splice.apply(items, [0, items.length].concat(pandora.getClipItems(result.data.clips))); items.splice.apply(items, [0, items.length].concat(pandora.getClipItems(result.data.clips)));