diff --git a/source/UI/js/Video/AnnotationFolder.js b/source/UI/js/Video/AnnotationFolder.js index 94a20a5e..8c2e1e72 100644 --- a/source/UI/js/Video/AnnotationFolder.js +++ b/source/UI/js/Video/AnnotationFolder.js @@ -769,7 +769,7 @@ Ox.AnnotationFolder = function(options, self) { ); } } - if (id != item.id) { + if (!self.editing && id != item.id) { self.$annotations.options({selected: self.options.selected}); } showWarnings(); diff --git a/source/UI/js/Video/VideoAnnotationPanel.js b/source/UI/js/Video/VideoAnnotationPanel.js index 530d6b96..c5ea1af7 100644 --- a/source/UI/js/Video/VideoAnnotationPanel.js +++ b/source/UI/js/Video/VideoAnnotationPanel.js @@ -1384,7 +1384,7 @@ Ox.VideoAnnotationPanel = function(options, self) { out: self.options.out, position: self.options.position }); - if (self.editing && self.options.selected[0] != '_') { + if (self.editing && self.options.selected.length && self.options.selected[0] != '_') { that.triggerEvent('editannotation', { id: self.options.selected, 'in': self.options['in'], @@ -1679,7 +1679,10 @@ Ox.VideoAnnotationPanel = function(options, self) { @*/ that.updateAnnotation = function(id, annotation) { // called from editannotation callback - self.options.selected = annotation.id; // fixme: needed? + // id might have changed if new annotation was created + if (annotation.id) { + self.options.selected = annotation.id; + } if (getSelectedLayer() == self.options.subtitlesLayer) { updateSubtitles(); }