forked from 0x2620/pandora
utils: use getPasteIndex
This commit is contained in:
parent
c41fbbc208
commit
9595b2555d
1 changed files with 1 additions and 6 deletions
|
@ -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)));
|
||||||
|
|
Loading…
Reference in a new issue