don't blur new annotations

This commit is contained in:
j 2018-03-31 14:00:15 +05:30
parent b9709f6702
commit 92ff15c5df
2 changed files with 6 additions and 3 deletions

View file

@ -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();

View file

@ -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();
}