From 3a37d136ec52762fee5ca5e4141645cd416d8372 Mon Sep 17 00:00:00 2001 From: j Date: Mon, 12 Nov 2018 09:43:50 +0000 Subject: [PATCH] don't add existing items again, only update annotations and timeline state --- source/UI/js/Video/VideoAnnotationPanel.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/UI/js/Video/VideoAnnotationPanel.js b/source/UI/js/Video/VideoAnnotationPanel.js index f25f4fa8..4700b283 100644 --- a/source/UI/js/Video/VideoAnnotationPanel.js +++ b/source/UI/js/Video/VideoAnnotationPanel.js @@ -1719,17 +1719,15 @@ Ox.VideoAnnotationPanel = function(options, self) { // id might have changed if new annotation was created if (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) { updateSubtitles(); } self.$annotationPanel.updateItem(id, annotation); + if (id != annotation.id) { + self.annotations = getAnnotations(); + setTimelineState(); + } }; /*@