From 5b9afde7b37d3fcc245a00f4771d611b789cdd6b Mon Sep 17 00:00:00 2001 From: rolux Date: Tue, 9 Oct 2018 19:44:26 +0200 Subject: [PATCH] fix highlight color on timeline for newly created annotations --- source/UI/js/Video/VideoAnnotationPanel.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/UI/js/Video/VideoAnnotationPanel.js b/source/UI/js/Video/VideoAnnotationPanel.js index 0f46a9f8..def3375e 100644 --- a/source/UI/js/Video/VideoAnnotationPanel.js +++ b/source/UI/js/Video/VideoAnnotationPanel.js @@ -1719,6 +1719,12 @@ 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();