don't add existing items again, only update annotations and timeline state
This commit is contained in:
parent
ad7e833519
commit
3a37d136ec
1 changed files with 4 additions and 6 deletions
|
@ -1719,17 +1719,15 @@ Ox.VideoAnnotationPanel = function(options, self) {
|
||||||
// id might have changed if new annotation was created
|
// id might have changed if new annotation was created
|
||||||
if (annotation.id) {
|
if (annotation.id) {
|
||||||
self.options.selected = annotation.id;
|
self.options.selected = annotation.id;
|
||||||
var layer = Ox.getObjectById(self.options.layers, annotation.layer);
|
|
||||||
var item = Ox.getObjectById(layer.items, annotation.id);
|
|
||||||
if (!item) {
|
|
||||||
layer.items.push(annotation);
|
|
||||||
self.annotations = getAnnotations();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (getSelectedLayer() == self.options.subtitlesLayer) {
|
if (getSelectedLayer() == self.options.subtitlesLayer) {
|
||||||
updateSubtitles();
|
updateSubtitles();
|
||||||
}
|
}
|
||||||
self.$annotationPanel.updateItem(id, annotation);
|
self.$annotationPanel.updateItem(id, annotation);
|
||||||
|
if (id != annotation.id) {
|
||||||
|
self.annotations = getAnnotations();
|
||||||
|
setTimelineState();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
|
|
Loading…
Reference in a new issue