fix a bug in join clips
This commit is contained in:
parent
5f06d88238
commit
026574c43f
1 changed files with 6 additions and 4 deletions
|
@ -407,9 +407,12 @@ Ox.ClipPanel = function(options, self) {
|
|||
Ox.forEach(clips, function(inClip, index) {
|
||||
var inPoint = inClip.item + '/' + inClip['in'];
|
||||
if (inPoint == outPoint) {
|
||||
ids = ids.concat([outClip.id, inClip.id]);
|
||||
join.push(outClip.id);
|
||||
ids = Ox.unique(ids.concat([outClip.id, inClip.id]));
|
||||
join = Ox.unique(join.concat([outClip.id]));
|
||||
outClip.out = inClip.out;
|
||||
if (Ox.contains(join, inClip.id)) {
|
||||
join.splice(join.indexOf(inClip.id), 1);
|
||||
}
|
||||
clips.splice(index, 1);
|
||||
joined = true;
|
||||
return false; // break
|
||||
|
@ -420,8 +423,7 @@ Ox.ClipPanel = function(options, self) {
|
|||
}
|
||||
});
|
||||
} while (joined);
|
||||
ids = Ox.unique(ids);
|
||||
join = Ox.unique(join).map(function(id) {
|
||||
join = join.map(function(id) {
|
||||
var clip = Ox.getObjectById(clips, id);
|
||||
return {'in': clip['in'], item: clip.item, out: clip.out};
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue