forked from 0x2620/pandora
fix (some) copy & paste bugs in edits
This commit is contained in:
parent
6012a4b9ba
commit
83dbe50894
2 changed files with 25 additions and 20 deletions
|
|
@ -200,19 +200,7 @@ pandora.ui.editPanel = function() {
|
|||
paste: function() {
|
||||
var clips;
|
||||
if (pandora.clipboard.type() == 'clip') {
|
||||
clips = pandora.clipboard.paste().map(function(clip) {
|
||||
var split = clip.split('/'),
|
||||
item = split[0],
|
||||
points = split[1].split('-');
|
||||
return Ox.extend({
|
||||
item: item
|
||||
}, points.length == 1 ? {
|
||||
annotation: clip
|
||||
} : {
|
||||
'in': parseFloat(points[0]),
|
||||
out: parseFloat(points[1])
|
||||
});
|
||||
});
|
||||
clips = pandora.clipboard.paste();
|
||||
pandora.doHistory('paste', clips, ui.edit, function(result) {
|
||||
Ox.Request.clearCache('getEdit');
|
||||
updateClips(edit.clips.concat(result.data.clips));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue